Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option --use-pnp doesn't end up with Yarn Plug’n’Play mode #5255

Closed
saberone opened this issue Oct 2, 2018 · 8 comments
Closed

Option --use-pnp doesn't end up with Yarn Plug’n’Play mode #5255

saberone opened this issue Oct 2, 2018 · 8 comments
Milestone

Comments

@saberone
Copy link

saberone commented Oct 2, 2018

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.

@saberone saberone changed the title Option --use-pnp doesn't end up with Yarn Plug’n’Play mode working Option --use-pnp doesn't end up with Yarn Plug’n’Play mode Oct 2, 2018
@gaearon
Copy link
Contributor

gaearon commented Oct 2, 2018

cc @arcanis

@arcanis
Copy link
Contributor

arcanis commented Oct 3, 2018

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?

@arcanis
Copy link
Contributor

arcanis commented Oct 3, 2018

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.

@Timer
Copy link
Contributor

Timer commented Oct 3, 2018

I assume this will be fixed via #5269. Let us know if it still isn't working (releasing in a few minutes)!

@Timer Timer closed this as completed Oct 3, 2018
@saberone
Copy link
Author

saberone commented Oct 4, 2018

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

@elken
Copy link

elken commented Oct 8, 2018

Not working for me on 1.13.0-20181006.0201.

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

@bugzpodder
Copy link

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

@jimthedev
Copy link

@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.

@lock lock bot locked and limited conversation to collaborators Jan 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants