npm,node更新最新版本
生活随笔
收集整理的這篇文章主要介紹了
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.log2、查看版本
npm -v3、安裝最新版本(全局)
npm install -g npm4、安裝指定版本(@后面跟版本號)
npm -g install npm@6.9.05、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更新最新版本的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Aras入门教程0_Aras 2023
- 下一篇: 记我经历的一次公司破产经历,一行代码害死