我跑了
$ npm install --global --production npm-windows-upgrade
Run Code Online (Sandbox Code Playgroud)
它返回了这个积极的反馈
??? cli-spinner@0.2.5
??? commander@2.9.0 (graceful-readlink@1.0.1)
??? chalk@1.1.3 (ansi-styles@2.2.1, escape-string-regexp@1.0.5, supports-color@2
.0.0, strip-ansi@3.0.1, has-ansi@2.0.0)
??? promise@7.1.1 (asap@2.0.4)
??? inquirer@1.0.3 (ansi-escapes@1.4.0, mute-stream@0.0.6, through@2.3.8, cli-wi
dth@2.1.0, strip-ansi@3.0.1, figures@1.7.0, pinkie-promise@2.0.1, run-async@2.2.
0, string-width@1.0.1, cli-cursor@1.0.2, rx@4.1.0, lodash@4.14.0)
??? babel-polyfill@6.9.1 (regenerator-runtime@0.9.5, babel-runtime@6.9.2, core-j
s@2.4.1)
??? regenerator-runtime-only@0.8.38 (promise@6.1.0, es6-symbol@2.0.1)
??? prompt@1.0.0 (revalidator@0.1.8, pkginfo@0.4.0, colors@1.1.2, read@1.0.7, ut
ile@0.3.0, winston@2.1.1)
Run Code Online (Sandbox Code Playgroud)
但是当我跑步时
$ npm-windows-upgrade
我懂了
'$ npm-windows-upgrade'不被识别为内部或外部命令
我按照这里的指示去做。知道发生了什么吗?我已经使用谷歌搜索了一段时间,但没有比这些基本说明更多的信息。
更新
意识到问题出在我试图在全球范围内安装的所有产品上。我以为我尝试运行的其他软件包有效,但它们却没有。例如$ webpack,在无法正常安装后返回相同的错误。
背景
我正在运行Windows,并且以前已安装npm。当那开始给我各种各样的错误时,我升级到了npm3。我相信那只是
$ npm install …Run Code Online (Sandbox Code Playgroud)