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.

`Error: spawn yarn ENOENT` on `vue create` with a clean install

See original GitHub issue

Version

4.5.6

Environment info

N/A

Steps to reproduce

  1. Globally install vue-cli
  2. Run vue create [myprojectname]

What is expected?

The project to be created

What is actually happening?

An error is thrown when creating the project (default options)

Error: spawn yarn ENOENT

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

43reactions
shauryadhadwalcommented, Nov 4, 2020

I also had the same issue. I am using Ubuntu. I used vue-cli before, so there is a file create ~/.vuerc which saves all your presets. In here, package manager was set as “yarn” which I no longer had. After deleting the file and using vue create, I was prompted to select package manager. The issue was resolved post this.

Note: Before this, I installed yarn with which the error was resolved. But would recommend to use the above method.

10reactions
andres-kcommented, Feb 4, 2021

I also had the same issue. I am using Ubuntu. I used vue-cli before, so there is a file create ~/.vuerc which saves all your presets. In here, package manager was set as “yarn” which I no longer had. After deleting the file and using vue create, I was prompted to select package manager. The issue was resolved post this.

Note: Before this, I installed yarn with which the error was resolved. But would recommend to use the above method.

Thank you. I also ran into the same issue using ASDF for managing different node environments and this gave me a lot of headache.

Deleting the ~/.vuerc file solved the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix the installing packages with yarn trace error spawn ...
The problem occurs when there is some problem with yarn. Either the installation is corrupted, there is no path set for the yarn,...
Read more >
`Error: spawn yarn ENOENT` on `vue create` with a clean install
An error is thrown when creating the project (default options) Error: spawn yarn ENOENT. See More. View in GitHub. SOLVE ISSUE.
Read more >
npm install error code 1 in vue.js when trying to create a project
I tried the npm cache clean --force then manually delete node_modules and package-lock.json and npm i . Doesn't work. I also tried to...
Read more >
Common errors | npm Docs
Broken npm installation; Random errors; No compatible version found ... Some strange issues can be resolved by simply running npm cache clean and...
Read more >
使用vue脚手架创建项目,及相关报错处理Error - CSDN博客
vue -cli创建项目:最后试了一下命令但仍未解决npm cache clean --forcenpm install查看命令行发现也报错:以上报错为未安装yarn,全局安装yarn:npm ...
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