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.

yarn error with vue create

See original GitHub issue

Version

3.7.0

Environment info

 System:
    OS: Linux 4.15 Ubuntu 18.04.2 LTS (Bionic Beaver)
    CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
  Binaries:
    Node: 8.10.0 - /usr/bin/node
    Yarn: 1.16.0 - /usr/local/bin/yarn
    npm: 3.5.2 - /usr/bin/npm
  Browsers:
    Chrome: 74.0.3729.108
    Firefox: Not Found
  npmGlobalPackages:
    @vue/cli: 3.7.0

Steps to reproduce

$ npm init $ npm install @vue/cli (? i may have used “yarn” in between) $ vue create myproject

What is expected?

the create process appears

What is actually happening?

00h00m00s 0/0: : ERROR Error: Command failed: yarn config get registry ERROR: [Errno 2] No such file or directory: ‘config’

Error: Command failed: yarn config get registry ERROR: [Errno 2] No such file or directory: ‘config’

at makeError (/usr/local/lib/node_modules/@vue/cli/node_modules/execa/index.js:174:9)
at Promise.all.then.arr (/usr/local/lib/node_modules/@vue/cli/node_modules/execa/index.js:278:16)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)

this can be a setup process issue as I’m still learning the nodejs ecosystem. But it appeared every time I executed it wherever I installed vue in.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

34reactions
LinusBorgcommented, May 14, 2019

despite running the create command with npm, vue-cli will try to use yarn to install the packages for that new projec for you - if it’s installed. (We can’t detect how you ran the create command so can’t deduce from that).

Since you appearantly have yarn installed, it tries to use yarn, but fails since your yarn config / installation seems broken?

You should check to see if running yarn config get registry works in your terminal.

Assuming yarn installation really is broken and you don’t succeed in fixing it, as a workaround you can

a) uninstall yarn so create will fall back to npm b) explictly tell it to use npm:

vue create myproject --packageManager npm 
11reactions
sodateacommented, May 14, 2019

Another workaround:

vue config -s packageManager npm
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when creating a vue project with CLI - Stack Overflow
As per the error it's trying to find yarn's config file in node_modules . You does not have yarn packageManager installed in your...
Read more >
Fixing Yarn errors on vue create app, vue-cli install, the ...
...and similar errors on using vue add axios, vue add router: I have spent an hour googling this error, reinstalling node, yarn, vue-cli, ......
Read more >
create vue cli app I got error that file or directory 'config' bot ...
Default (Vue 3 Preview) ([Vue 3] babel, eslint) > Yarn : I got error in th console : Copy Code Vue CLI v4.5.8...
Read more >
Install vue/cli app with yarn raise errors - JavaScript - SitePoint
Install vue/cli app with yarn raise errors ... Did I miss some options? Thanks! ... 0.32 looks to be very old for yarn....
Read more >
@vue/cli | Yarn - Package Manager
Command line interface for rapid Vue.js development. vue, cli. readme. @vue/cli. npm install -g @vue/cli vue create my-project.
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