以下是我所遇到的问题及最终的解决方法:
:\vue\mall-vue>
npm audit fix
pm ERR! code ECONNRESET
pm ERR! errno ECONNRESET
pm ERR! network request to https://registry.npmjs.org/-/npm/v1/security/audits
ailed, reason: Client network socket disconnected before secure TLS connection
as established
pm ERR! network This is a problem related to network connectivity.
pm ERR! network In most cases you are behind a proxy or have bad network settin
s.
pm ERR! network
pm ERR! network If you are behind a proxy, please make sure that the
pm ERR! network 'proxy' config is set properly. See: 'npm help config'
pm ERR! A complete log of this run can be found in:
pm ERR! C:\Program Files (x86)\nodejs\node_cache\_logs\2019-04-02T15_02_00_
24Z-debug.log
问题一的解决方法:
发现是没有json文件的问题,输入:
npm init --yes
以下是我所遇到的问题及最终的解决方法:问题一::\vue\mall-vue>npm audit fixpm ERR! code ECONNRESETpm ERR! errno ECONNRESETpm ERR! network request to https://registry.npmjs.org/-/npm/v1/security/auditsailed, reason...
先去配置环境变量
C:\Users\lgd\AppData\Local\Programs\Microsoft VS Code\bin的后面配置 ;%SystemRoot%\system32;一定要注意分号,
然后在path环境中配置C:\Windows\System32
最后去项目安装依赖
npm
i
运行项目
npm
run serve
如果这样子项目还是报同样的错误,那么就把node全局卸载,去控制面板卸载,然后安装,最后安装依赖,运行项目就可以成功了
补充知识:vue
npm
run serve
报错
Cannot find module ‘eslint-plugin
背景:执行
npm
install 出现如下提醒added 253 packages from 162 contributors and
audit
ed 1117 packages in 42.157s
found 5 vulnerabilities (1 low, 4 high)
run `
npm
audit
fix
` to
fix
them, or `
npm
audit
` for detai...
node-sass
报错
解决办法
失败的原因是node-sass下载的地址不对,
正确的地址是在这个目录下:https://github.com/sass/node-sass/releases
不是https://github.com/sass/node-sass/releases/download/v4.11.0/win32-x64-59_binding.node。
安装时指定镜像源
npm
i...
这两天使用
npm
一直出现这个错误,当时没有在意,后来发现报的错误越来越多,如下:
found 658 vulnerabilities (654 low, 3 moderate, 1 high) in 2770 scanned packages
run `
npm
audit
fix
` to
fix
1 of them.
4 vulnerabilities require semver-major dependency updates.
653 vulnerabilities require man