2

So basically I am trying to set up a new Vue project using vue create vue-first-app and I end up with this error below. I tried to increase the timeout using npm install -timeout=9999999 . I also tried cleaning the npm cashe with npm cache clean --force but it did not help. Does anyone know a way to solve this?

    Vue CLI v4.5.9
✨  Creating project in /home/marius/vue/vue-first-app.
🗃  Initializing git repository...
⚙️  Installing CLI plugins. This might take a while...

npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! request to https://registry.npm.taobao.org/mkdirp failed, reason: Socket timeout

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/marius/.npm/_logs/2020-12-14T09_54_21_447Z-debug.log
 ERROR  command failed: npm install --loglevel error --legacy-peer-deps
1
  • Having the exact same problem! Commented Dec 18, 2020 at 7:14

4 Answers 4

1

Try

Either:

  1. sudo npm cache clean -f
  2. npm update
  3. npm update -g @vue/cli
  4. vue create vue-first-app

OR

Point the npm registry url to http :

npm config set registry="http://registry.npmjs.org/"

And then re-run your vue cli command :

vue create vue-first-app

Sign up to request clarification or add additional context in comments.

Comments

0

This may help you.

  1. Check if you have a working internet connection (check if the firewall is not blocking the connection request)

  2. Try to go the npm config file and change the time out from there. This issue is commonly caused when one of these two reasons occur. Path: installationDirectory\nodejs\node_modules\npm and open the .npmrc file and try changing the time out from there.

Also refer: https://docs.npmjs.com/common-errors

Comments

0

Had the same problem.

For me, using sudo worked.

sudo vue create vue-first-app

Good luck!

Comments

0

I had a similar problem, for me it worked changing the useTaobaoRegistry to false in the config .vuerc, it should be located on C:/User/your_name/

{ "packageManager": "npm", "useTaobaoRegistry": false }

Thanks to fangbinwei for the solution: https://github.com/vuejs/vue-cli/issues/6003#issuecomment-716158880

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.