命令行更新node版本
2017-08-17 12:49
176 查看
命令行更新node版本
1.更新node.js版本命令:npm install -g n
2.升级node.js到最新稳定版
n stable
遇到的错误:
1 、D:\webpack>npm install -g n
npm ERR! Windows_NT 6.1.7601
npm ERR! argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\
node_modules\npm\bin\npm-cli.js” “install” “-g” “n”
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for n@2.1.8: wanted {“os”:”!win32”,”arch”:”
any”} (current: {“os”:”win32”,”arch”:”x64”})
npm ERR! notsup Valid OS: !win32
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64
npm ERR! Please include the following file with any support request:
npm ERR! D:\webpack\npm-debug.log
解决方案
npm install -g n --force或-f:强制重新安装
2、
D:\webpack>npm install webpack –save-dev
npm ERR! Windows_NT 6.1.7601
npm ERR! argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\
node_modules\npm\bin\npm-cli.js” “install” “webpack” “–save-dev”
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! code ENOSELF
npm ERR! Refusing to install webpack as a dependency of itself
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! D:\webpack\npm-debug.log
解决方案:
出现问题是因为:package.json中已经有webpack了,换个名字就行了相关文章推荐
- node和npm版本更新
- 微软开放技术发布针对 Mac 和 Linux 的更新版 Azure Node.JS SDK 和命令行工具
- 版本控制之svn命令行下检出、提交、更新
- 微软开放技术发布针对 Mac 和 Linux 的更新版 Azure Node.JS SDK 和命令行工具
- Mac更新Node.js版本
- 更新npm和node版本
- node、npm及node_modules中依赖的版本更新
- node更新版本后sass无法编译解决办法
- node版本更新和npm版本更新
- Linux 系统更新命令行模式,出错原因,软件更新器更新失败,系统提示已为最新版本,问题如何解决
- npm, node版本更新
- mac下命令行安装node.js及切换不同版本nodejs
- [node] node 版本更新
- mac 下更新node.js的版本
- node更新版本后 sass文件 编译报错
- Mac下更新node版本
- node更新版本
- Node.js实现android的apk版本更新服务器
- mac下命令行安装node.js及切换不同版本nodejs
- 更新node版本