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

歡迎訪問 生活随笔!

生活随笔

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

编程问答

npm,node更新最新版本

發布時間:2024/1/18 编程问答 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 npm,node更新最新版本 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1、錯誤場景:安裝vue插件的時候,報錯,提示安裝最新版本

npm ERR! Windows_NT 6.1.7601 npm ERR! argv "D:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator.CE-20151109NQJC\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev" npm ERR! node v10.15.3 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! muse-ui@3.0.2 dev: `NODE_ENV=normal parcel demo/index.html` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the muse-ui@3.0.2 dev script 'NODE_ENV=normal parcel demo/index.html'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the muse-ui package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! NODE_ENV=normal parcel demo/index.html npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs muse-ui npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls muse-ui npm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request: npm ERR! F:\frame\vue\muse-ui-master\npm-debug.log

2、查看版本

npm -v

3、安裝最新版本(全局)

npm install -g npm

4、安裝指定版本(@后面跟版本號)

npm -g install npm@6.9.0

5、node版本升級

官網下載最新安裝包,安裝覆蓋

6、安裝另外一個包的時候,還是有報錯,

C:\Users\Administrator.CE-20151109NQJC\AppData\Roaming\npm npm WARN deprecated autoprefixer-loader@3.2.0: Please use postcss-loader instead of autoprefixer-loader npm WARN deprecated babel-preset-es2015@6.24.1: � Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update! npm ERR! Unexpected end of JSON input while parsing near '...ata-0.0.10.tgz"}},"0.'npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Administrator.CE-20151109NQJC\AppData\Roaming\npm-cache\_logs\2019-04-01T09_59_14_849Z-debug.log

錯誤原因分析

使用命令npm install xx安裝包的時候,默認是從npm的鏡像源服務器進行下載的,該服務器是放在國外,很容易安裝失敗,因此全局安裝nrm鏡像源管理器,nrm里面存放了多個鏡像源服務器

npm isntall nrm -g

問題解決:

先清空緩存,再重新安裝

npm cache clearn --forcenpm install

總結

以上是生活随笔為你收集整理的npm,node更新最新版本的全部內容,希望文章能夠幫你解決所遇到的問題。

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