npm安装@vue/cli失败,提示仅支持https

之前装过这些,但因为别的原因,把AppData下相关文件和用户的注册文件删了重装,结果这次安装失败。
先是卡在**fetchmetadata:sill resolvewithnewmodule typescript**不动,然后取消了两次后,
配置了阿里镜像:npm config set registry https://registry.npm.taobao.org,然后再执行就报错误,说仅支持https。
这是dos界面提示

图片说明

cnpm模块的package.json文件:
图片说明

debug文件:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'D:\\work softs\\web_html\\nodejs\\node.exe',
1 verbose cli   'D:\\work softs\\web_html\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   '@vue/cli',
1 verbose cli   '-g'
1 verbose cli ]
2 info using npm@6.10.3
3 info using node@v12.10.0
4 verbose npm-session 599580d47326bd14
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData error for @vue/cli@latest Only HTTP(S) protocols are supported
8 timing stage:rollbackFailedOptional Completed in 1ms
9 timing stage:runTopLevelLifecycles Completed in 27ms
10 verbose stack TypeError: Only HTTP(S) protocols are supported
10 verbose stack     at getNodeRequestOptions (D:\work softs\web_html\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\request.js:135:11)
10 verbose stack     at D:\work softs\web_html\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:44:21
10 verbose stack     at new Promise (<anonymous>)
10 verbose stack     at fetch (D:\work softs\web_html\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:41:10)
10 verbose stack     at D:\work softs\web_html\nodejs\node_modules\npm\node_modules\make-fetch-happen\index.js:332:14
10 verbose stack     at D:\work softs\web_html\nodejs\node_modules\npm\node_modules\promise-retry\index.js:29:24
11 verbose cwd C:\Users\86180
12 verbose Windows_NT 10.0.18362
13 verbose argv "D:\\work softs\\web_html\\nodejs\\node.exe" "D:\\work softs\\web_html\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "@vue/cli" "-g"
14 verbose node v12.10.0
15 verbose npm  v6.10.3
16 error Only HTTP(S) protocols are supported
17 verbose exit [ 1, true ]

1个回答

npm config set registry https://registry.npmjs.org/
weixin_43751022
weixin_43751022 就是我这个npm的淘宝镜像npm config set registry https://registry.npm.taobao.org置错了吗?在cnpm模块的倒数第九行有淘宝的镜像就够了是吧
10 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问