npm安装依赖包报错

最近在新下载了一个项目,需要 npm i 下载依赖,,但是一直报错,,
首先用cnpm源下载

$ npm install -g npm
npm ERR! code E500
npm ERR! 500 Internal Privoxy Error: npm@latest
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\zt\AppData\Roaming\npm-cache_logs\2018-09-11T01_15_45_539Z-debug.log

换成npm源

$ npm i
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network request to https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz failed, reason: socket hang up
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network ‘proxy’ config is set properly. See: ‘npm help config’
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\zt\AppData\Roaming\npm-cache_logs\2018-09-11T01_54_12_546Z-debug.log

于是百度
https://segmentfault.com/q/1010000006696165,找到了这篇文章

这里写图片描述

于是我想到了我之前好像设置了网路代理(set proxy=http://127.0.0.1:45593
于是跟着做了一下,,果不其然
这里写图片描述
设置完之后重新npm i

$ npm i
node-sass@4.9.3 install E:\2018\ionic4-sidemenu\node_modules\node-sass
node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-57_binding.node
Download complete
Binary saved to E:\2018\ionic4-sidemenu\node_modules\node-sass\vendor\win32-x64-57\binding.node
Caching binary to C:\Users\zt\AppData\Roaming\npm-cache\node-sass\4.9.3\win32-x64-57_binding.node
node-sass@4.9.3 postinstall E:\2018\ionic4-sidemenu\node_modules\node-sass
node scripts/build.js
Binary found at E:\2018\ionic4-sidemenu\node_modules\node-sass\vendor\win32-x64-57\binding.node
Testing binary
Binary is fine
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {“os”:”darwin”,”arch”:”any”} (current: {“os”:”win32”,”arch”:”x64”})
added 1136 packages in 435.919s

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值