Latest version cannot create anything without yarn
See original GitHub issueVersion
3.4.0
Environment info
Environment Info:
System:
OS: Linux 4.20 Fedora 29 (Workstation Edition) 29 (Workstation Edition)
CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Binaries:
Node: 10.14.1 - /usr/bin/node
Yarn: Not Found
npm: 6.4.1 - /usr/bin/npm
Browsers:
Chrome: 72.0.3626.81
Firefox: 65.0
npmGlobalPackages:
@vue/cli: 3.3.0 (reverted, this one works while latest is broken)
Steps to reproduce
- use clean machine
- install node 10 with npm, no yarn
- npm i -g @vue/cli
- vue create hello
What is expected?
Wizard starts, asking for options e.g. which package manager to use.
What is actually happening?
Yarn is missing (although not needed), wizard and childprocess crash.
ERROR Error: spawn yarn ENOENT
Error: spawn yarn ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
at onErrorNT (internal/child_process.js:407:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:11)
at startup (internal/bootstrap/node.js:285:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
Any attempts in forcing npm as a packageManager (via .vuerc) were futile, either returning the same error or this one:
ERROR ~/.vuerc may be outdated. Please delete it and re-run vue-cli in manual mode.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Error Codes | Yarn - Package Manager
This informational message occurs when Yarn wishes to let you know that a package will need to be built for the installation to...
Read more >An unexpected error occurred: "Cannot create property.." after ...
The error was only due to a misconfigured .npmrc file. The error was not evident to find ! Some yarn commands would work...
Read more >yarn install leads to Cannot find module yarn-berry.js
Anything related to the yarn function returns this error. Have tried uninstalling and re-installing through homebrew but always results in this.
Read more >npm, pnpm, and Yarn | PhpStorm Documentation - JetBrains
Information on the latest available package version. Showing the latest available package version. Information about the range of versions that ...
Read more >Yarn.lock: How to Update it - DEV Community
If you remove the lock file completely and then run yarn install , yarn will re-resolve all versions to the latest allowed by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I ran into a similar issue with a very similar error message, which I could not figure out for a long time. I wanted to record what I discovered in the hope that it could help someone in the future.
When I would create new Vue projects with
vue create <project name>
it would create ayarn.lock
file, even though I was using npm. So I tried uninstalling Yarn and removing all necessary Yarn files to prevent this from happening. After uninstalling Yarn, I got aError: spawn yarn ENOENT
message in my terminal (very similar to the one shown above) and I could not create any Vue projects.After trying a bunch of things, I reinstalled Yarn and everything worked again. I could see that Vue CLI was clearly creating projects with Yarn, but I didn’t know why. And then I came across this post: https://github.com/vuejs/vue-cli/issues/1300. I also read the documentation that explains the
.vuerc
file here: https://cli.vuejs.org/guide/creating-a-project.html#vue-create. That solved everything. I opened the~/.vuerc
file and set the package manager tonpm
and all is well now.had the same issue. i removed
~/.vuerc
file, and now it works.