如果您收到ERR!可能引起此问题的原因不是警告,您使用的是NPM的版本确实过时
对我来说,我炮轰到某个服务器上,就像“为什么不行?”,得到了这个错误:
npm ERR! Linux 4.4.0-130-generic
npm ERR! argv "/home/william/.nvm/versions/node/v4.4.3/bin/node" "/home/william/.nvm/versions/node/v4.4.3/bin/npm" "install"
npm ERR! node v4.4.3
npm ERR! npm v2.15.1
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: fsevents@1.1.3
npm ERR! notsup Valid OS: darwin
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: linux
npm ERR! notsup Actual Arch: x64
npm ERR! Please include the following file with any support request:
npm ERR! /home/william/app/mcard-api/npm-debug.log
原来这台服务器(我最近才购买)正在运行npm 2.15.1。我重新安装了nvm,然后nvm install --lts修复了它。