vue-cli icon indicating copy to clipboard operation
vue-cli copied to clipboard

Getting EUNSUPPORTEDPROTOCOL error when creating project

Open dland512 opened this issue 6 years ago • 7 comments

Version

4.5.3

Environment info

Environment Info:

  System:
    OS: macOS 10.15.5
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 8.11.1 - ~/.nvm/versions/node/v8.11.1/bin/node
    Yarn: Not Found
    npm: 5.6.0 - ~/.nvm/versions/node/v8.11.1/bin/npm
  Browsers:
    Chrome: 84.0.4147.125
    Edge: Not Found
    Firefox: 79.0
    Safari: 13.1.1
  npmGlobalPackages:
    @vue/cli: 4.5.3

Steps to reproduce

vue create my-project
select Default ([Vue 2] babel, eslint)

What is expected?

It should create a new vue project

What is actually happening?

I'm getting this error

Vue CLI v4.5.3
✨  Creating project in /Users/me/my-project.
🗃  Initializing git repository...
⚙️  Installing CLI plugins. This might take a while...

npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "npm:": npm:vue-loader@^16.0.0-beta.3

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/me/.npm/_logs/2020-08-17T18_49_36_738Z-debug.log
 ERROR  command failed: npm install --loglevel error

This was working fine a few days ago, not sure what happened.

dland512 avatar Aug 17 '20 18:08 dland512

As a workaround, please use npm >= 6.9

haoqunjiang avatar Aug 18 '20 01:08 haoqunjiang

When I implemented this https://github.com/vuejs/vue-cli/pull/5718 I tested with npm i @vue/cli-service under npm 5 and the failed installation of the optional dependency did not throw an error.

Turns out this only works with npm i + some specific package, not npm i along with a package.json. So to support npm 5, we might need to turn the npm install call to several npm install some-package calls.

haoqunjiang avatar Aug 18 '20 01:08 haoqunjiang

I get this error with @vue/cli 4.5.4 and npm 6.14.8, any idea why?

ricardogffcouto avatar Aug 18 '20 14:08 ricardogffcouto

I get this same error with @vue/cli 4.5.4 and npm 6.10.3, exhausted

sanfran1068 avatar Aug 26 '20 07:08 sanfran1068

This fix my problem

npm install -g npm

Upgrade npm version

anamarquezz avatar Oct 13 '20 16:10 anamarquezz

This fix my problem

npm install -g npm

Upgrade npm version

Thank you!

hubert17 avatar Jul 05 '21 22:07 hubert17

npm install -g npm

Thank you!

hetasanghvi-zz avatar Jul 27 '21 23:07 hetasanghvi-zz