Create-react-app: Option --use-pnp doesn't end up with Yarn Plug鈥檔鈥橮lay mode

Created on 2 Oct 2018  路  8Comments  路  Source: facebook/create-react-app

Is this a bug report?

Yes

Environment

macOS Mojave (10.14)

The npx create-react-app --info command doesn't work for me.

Steps to Reproduce

  1. Install yarn 1.10.1
  2. Run npx create-react-app testapp --use-pnp
  3. Install yarn 1.12.0-20181002.1534 (nightly)
  4. Run npx create-react-app testapp --use-pnp

Expected Behavior

No node_modules folder anymore (duh ;) )

Actual Behavior

node_modules folder was present with both stable yarn as nightly version.

question

Most helpful comment

Yes it works correctly with yarn v1.13.0-20181002.2034. Sweeet! The speed of this thing is crazy ;)

All 8 comments

cc @arcanis

Hey @saberone! You need Yarn 1.12+ (currently in rc) to use --use-pnp. Installing it should be quite easy, we have instructions on the website 馃檪

@gaearon Do you think it would be worthwhile to detect Yarn's version and print a notice if the current version doesn't support PnP when --use-pnp is used?

Wait I didn't see you tried with both the regular and nightly versions. Can you share:

  • The output of both create-react-app commands (in particular the "yarn add v1.x.y" part)
  • The way you installed Yarn
  • The output of which yarn and which yarnpkg

Maybe the way it's been installed has an issue that prevents create-react-app from correctly picking up the right version? I know it uses the yarnpkg binary instead of yarn, so that might be a factor.

I assume this will be fixed via https://github.com/facebook/create-react-app/pull/5269. Let us know if it still isn't working (releasing in a few minutes)!

Yes it works correctly with yarn v1.13.0-20181002.2034. Sweeet! The speed of this thing is crazy ;)

Not working for me on 1.13.0-20181006.0201.

node_modules is present and installConfig.pnp is missing from my package.json.

I tested and it worked for me. Please file a new bug report if you are having difficulties.

@elken I had some trouble where the check for version was having problems with nightly build versions. the semver package was being used and the .xxxx was causing it to fail, thus failing the check.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

barcher picture barcher  路  3Comments

ap13p picture ap13p  路  3Comments

alleroux picture alleroux  路  3Comments

JimmyLv picture JimmyLv  路  3Comments

Evan-GK picture Evan-GK  路  3Comments