Dam*_*ien 3 node.js npm vue.js
我正在尝试通过 vue-cli 设置 vue 应用程序。一切都很顺利,直到我打字
npm install
Run Code Online (Sandbox Code Playgroud)
安装依赖项。https 出现错误,所以我将其更改为 http,但随后我收到以下日志:
npm WARN registry Unexpected warning for http://registry.npmjs.org/: Miscellaneous Warning ECONNRESET: request to http://registry.npmjs.org/debug failed, reason: socket hang up
npm WARN registry Using stale package data from http://registry.npmjs.org/ due to a request error during revalidation.
Run Code Online (Sandbox Code Playgroud)
我也用过
npm config rm proxy
npm config rm https-proxy
Run Code Online (Sandbox Code Playgroud)
并且仍然有同样的问题。
手动将 https 更改为 http
npm config set registry="http://registry.npmjs.org/"
npm config set strict-ssl false
Run Code Online (Sandbox Code Playgroud)
如果你在代理后面,否则忽略这个
npm config set proxy http://username:password@10.80.81.180:80
npm config set https-proxy http://username:password@10.80.81.180:80
Run Code Online (Sandbox Code Playgroud)
安装 vue-cli
npm install -g vue-cli
Run Code Online (Sandbox Code Playgroud)
设置vuejs项目
vue-init webpack-simple vueproject
Run Code Online (Sandbox Code Playgroud)
安装依赖项
npm install
Run Code Online (Sandbox Code Playgroud)
现在您的 vuejs 样板项目设置已完成
更新#1
首先清除 npm 缓存,然后尝试上述步骤
npm cache clear --force
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6989 次 |
| 最近记录: |