-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Error: spawn yarnpkg ENOENT #1429
Comments
@beac0n Have you made sure to set up your PATH?
|
@lmcjt37 : Yes, the Either the |
@lmcjt37 : yarnpkg/yarn@cefa9a3 |
@beac0n Looks like that should also fix the alias issue and easier to just bump your version to test. |
@lmcjt37 : since I have fixed it for my system (for now). I would like to wait until |
@beac0n Think it needs to be parked until this issue can be resolved and confirmed based on the above. |
I’m not sure what you mean by “yarn 0.20”. The commit in question existed since 0.16. |
I don't know why We should fix CRA to not crash when this happens, and instead fall back to npm. |
@gaearon :
you're right. I looked at the wrong version number :-| (sorry about that).
|
The linked issue was referencing 1.0.3, not 1.0.2: #1363 (comment). |
@gaearon upgrading to |
Yea, that would be the Yarn issue I guess. Not sure why it happens. I hope it gets resolved! |
Maybe it's possible the Arch Linux package doesn't come with a |
That would explain it! |
For what it's worth, Facebook laptops seem to be set up with |
Haha I just ran into this, thanks 😄 |
I'm still having this issue even on Mac. I also tried creating a yarnpkg alias to yarn. |
Want to file a new issue? If you provide many details we might be able to help. Hard to track in an old issue though. |
The problem as described in this existing issue still exists, there is no additional new information to add to it. The issue simply still persists as it was reported. Here are the package versions on my macOS highSierra, I am still encountering this issue today: |
Can you reproduce the problem with latest npm?
I'm using yarn
Description
creating a new projet with
create-react-app
produces an error and the resulting projet is not workingExpected behavior
create-react-app testProject
should finish without any errors and create a working projectActual behavior
create-react-app testProject
terminates with the following errorInstalling react and react-dom using yarnpkg...
events.js:160
throw er; // Unhandled 'error' event
^
Error: spawn yarnpkg ENOENT
at exports._errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
Environment
Run these commands in the project folder and fill in their results:
npm ls react-scripts
(if you haven’t ejected):> $ npm ls react-scripts [email protected] /home/beac0n/dev/testProj └── [email protected]
node -v
:> $ node -v v7.4.0
npm -v
:> $ npm -v 4.1.1
> $ yarn --version 0.19.1
Then, specify:
Failed to compile.
Error in ./src/index.js
Module not found: 'react' in /home/beac0n/dev/testProj/src
@ ./src/index.js 5:13-29
Error in ./src/App.js
Module not found: 'react' in /home/beac0n/dev/testProj/src
@ ./src/App.js 10:13-29
Error in ./src/index.js
Module not found: 'react-dom' in /home/beac0n/dev/testProj/src
@ ./src/index.js 9:16-36
Potential Fix
I could actually fix the issue, by executing:
sudo ln -s /usr/lib/node_modules/yarn/bin/yarn.js yarnpkg
in my
/usr/bin/
directory.It seems like create-react-app tries to use the command
yarnpkg
wich was not available on my arch linux system, although I installed yarn as described here: https://yarnpkg.com/en/docs/install#alternatives-tabI'm not sure if this is an issue with my operating system, with yarn or with create-react-app.
The issue only occurs when using create-react-app
The text was updated successfully, but these errors were encountered: