日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

npm安装依赖包报错

發布時間:2023/12/31 编程问答 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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

總結

以上是生活随笔為你收集整理的npm安装依赖包报错的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。