“你的npm版本已经过时”,但事实并非如此。 安装哟

在Windows 7 64位。 通过向导给我npm安装Node.js。

我运行npm install -g哟,并得到以下

你的npm版本已经过时了。

完整的输出:

C:\Users\dlite922>npm install -g yo | > spawn-sync@1.0.11 postinstall C:\Users\dlite922\AppData\Roaming\npm\node_modules\yo\node_modules\cross-spawn\node_modules\spaw > node postinstall C:\Users\dlite922\AppData\Roaming\npm\yo -> C:\Users\dlite922\AppData\Roaming\npm\node_modules\yo\lib\cli.js > yo@1.4.7 postinstall C:\Users\dlite922\AppData\Roaming\npm\node_modules\yo > yodoctor Yeoman Doctor Running sanity checks on your system √ Global configuration file is valid √ NODE_PATH matches the npm root √ Node.js version × npm version Your npm version is outdated. Upgrade to the latest version by running: npm install -g npm See this guide if you're having trouble upgrading: https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows √ No .bowerrc file in home directory √ No .yo-rc.json file in home directory Found potential issues on your machine :( yo@1.4.7 C:\Users\dlite922\AppData\Roaming\npm\node_modules\yo ├── titleize@1.0.0 ├── array-uniq@1.0.2 ├── figures@1.3.5 ├── user-home@1.1.1 ├── opn@1.0.2 ├── async@1.2.1 ├── humanize-string@1.0.1 (decamelize@1.0.0) ├── sort-on@1.2.0 (dot-prop@2.1.0) ├── string-length@1.0.0 (strip-ansi@2.0.1) ├── yeoman-character@1.0.1 (supports-color@1.3.1) ├── findup@0.1.5 (commander@2.1.0, colors@0.6.2) ├── meow@3.1.0 (object-assign@2.1.1, minimist@1.1.1, camelcase-keys@1.0.0, indent-string@1.2.1) ├── yosay@1.0.4 (ansi-regex@1.1.1, pad-component@0.0.1, ansi-styles@2.0.1, word-wrap@1.0.3, strip-ansi@2.0.1, minimist@1.1.1, take ├── chalk@1.0.0 (escape-string-regexp@1.0.3, ansi-styles@2.0.1, supports-color@1.3.1, strip-ansi@2.0.1, has-ansi@1.0.3) ├── root-check@1.0.0 (sudo-block@1.2.0, downgrade-root@1.1.0) ├── repeating@1.1.3 (is-finite@1.0.1) ├── configstore@1.0.0 (object-assign@2.1.1, xdg-basedir@1.0.1, osenv@0.1.1, graceful-fs@3.0.8, uuid@2.0.1, mkdirp@0.5.1) ├── update-notifier@0.5.0 (is-npm@1.0.0, latest-version@1.0.0, semver-diff@2.0.0) ├── package-json@1.2.0 (registry-url@3.0.3) ├── got@3.2.0 (lowercase-keys@1.0.0, timed-out@2.0.0, is-stream@1.0.1, prepend-http@1.0.1, object-assign@2.1.1, nested-error-stack fy@3.4.1) ├── npm-keyword@1.1.1 (registry-url@3.0.3, got@2.9.2) ├── fullname@1.1.0 (npmconf@2.1.2) ├── cross-spawn@0.4.0 (lru-cache@2.6.4, spawn-sync@1.0.11) ├── yeoman-environment@1.2.5 (untildify@2.0.0, escape-string-regexp@1.0.3, log-symbols@1.0.2, diff@1.4.0, text-table@0.2.0, debug@ ├── lodash@3.9.3 ├── yeoman-doctor@1.4.0 (object-values@1.0.0, log-symbols@1.0.2, each-async@1.1.1, semver@4.3.6, bin-version-check@2.1.0, twig@0.8 ├── inquirer@0.8.5 (ansi-regex@1.1.1, cli-width@1.0.1, through@2.3.7, readline2@0.1.1, rx@2.5.3) └── insight@0.6.0 (object-assign@2.1.1, async@0.9.2, lodash.debounce@3.1.0, os-name@1.0.3, tough-cookie@1.2.0, request@2.57.0) 

然而我有一个非常新的npm版本:

 C:\Users\dlite922>npm -v 2.10.1 

我遵循故障排除,并将我的%appdata%npm BEFORE nodejs放在我的%PATH%列表中,但仍然得到上面的响应。

运气好的话?

PS:顺便说一下,这意味着堆栈如此混乱。 有五千万种安装方式,并且在其首页上快速安装两步,就像世界上最简单的一样。 那么当他们假设的20个先决条件被安装的时候,每个人都觉得很愚蠢。 Web应用程序开发的未来如果JavaScript正在引领这些日子,就会变得混乱。 我以为PHP的日子很糟糕。 大声笑/ endRant

Solutions Collecting From Web of "“你的npm版本已经过时”,但事实并非如此。 安装哟"