-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Plug'n'Play does not work with Node 11 #7092
Comments
@stefanpenner, @davecombs, and myself ran across this issue (discussion over in stefanpenner/resolve-package-path#7). The symptoms that we witness were that in Node 11 any scripts had to manually add |
I spent some time digging into this and found the underlying issue in Node 11's parsing of However, I also went to submit a patch working around the issue but I believe it is already fixed (by #6942 and #6951) on master. Unfortunately, #6951 is not included in 1.14.0 (but #6942 is) so on 1.14.0 some things "work" with Node 11 (e.g. |
Thanks for the investigation, @rwjblue! That was a good one 😅 I've started the release process for the 1.15 (and will put the 1.14 in stable once it's done), it was time to do it anyway 🙂 the patch should be made available in a few hours. |
closing as this got fixed in Node v11.12.0 |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
When using
yarn run
on Node 11 it does not activate PnP mode automatically when"pnp": true
is specified in thepackage.json
file.If the current behavior is a bug, please provide the steps to reproduce.
yarn init
yarn add chalk
(just an example)index.js
file:package.json
so thatyarn run foo
runs theindex.js
fileyarn run foo
(should run fine and print the string in red)yarn --pnp
(enable PnP mode)yarn run foo
(fails withError: Cannot find module 'chalk'
)when you switch over from Node 11 to Node 10 everything works fine
What is the expected behavior?
yarn run
should enable PnP mode automatically on Node 11 tooPlease mention your node.js, yarn and operating system version.
OS: macOS 10.13.6
node: 10.15.0 and 11.10.0
yarn: 1.13.0
The text was updated successfully, but these errors were encountered: