question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Latest version cannot create anything without yarn

See original GitHub issue

Version

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

  1. use clean machine
  2. install node 10 with npm, no yarn
  3. npm i -g @vue/cli
  4. 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:closed
  • Created 5 years ago
  • Reactions:10
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

21reactions
SamuelEarlcommented, Jan 17, 2020

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 a yarn.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 a Error: 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 to npm and all is well now.

16reactions
davidmeirlevycommented, Jan 11, 2020

had the same issue. i removed ~/.vuerc file, and now it works.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found