npm提示Unsupported version of node的解决方法

将本地Node升级到9.2.0版本之后,使用NPM命令的时候时候提示:

npm WARN npm npm does not support Node.js v9.0.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8.
npm WARN npm You can find the latest version at
https://nodejs.org/

我本地的NPM版本未5.6.1

貌似这是新版本的一个BUG,在这个ISSUE里面可以看到相关的讨论:https://github.com/npm/npm/issues/19019

基本的思路是想办法升级NPM到5.6.0版本(npm install -g npm@latest

但是由于我的NPM命令根本无法用,所以还是通过brew方式来进行升级。

brew install --devel node
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • This project was bootstrapped with Create React App. Belo...
    unspecx阅读 10,592评论 0 2
  • 描述 npm从以下来源获取配置值,按优先级排序: 命令行标记 在命令行上放置--foo bar设置foo配置参数为...
    竹天亮阅读 44,351评论 0 8
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,421评论 19 139
  • 题记 上周末去参加了一个读书会活动,其中主持人提到,你可以想象哪几本书能够代表你自己,我没有想起来,可是却结结实实...
    我是瑞雪阅读 7,850评论 32 74
  • 开头的一些话:也不知道为什么,突然想在这个看着Derivatives securities and corpora...
    jj720阅读 1,410评论 0 1