I'm trying to create a Vue project using the Vue CLI in Ubuntu, but keep getting the same error. I've already installed the Vue CLI using sudo npm i -g @vue/cli
.
Here is the error message:
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 processTicksAndRejections (internal/process/next_tick.js:81:5)
What is the reason for this?
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 system I believe
Try this
vue config -s packageManager npm
and re-run vue create
a) uninstall yarn so create will fall back to npm
b) explictly tell it to use npm:
vue create myproject --packageManager npm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With