Node.js &引用;您的npm版本已过时。”;但是它';不是。同时安装哟

Node.js &引用;您的npm版本已过时。”;但是它';不是。同时安装哟,node.js,npm,yeoman,mean-stack,Node.js,Npm,Yeoman,Mean Stack,在Windows7上,64位。通过向导安装Node.js,该向导为我提供了npm 我运行npm安装-g yo并得到以下结果 您的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\s

在Windows7上,64位。通过向导安装Node.js,该向导为我提供了npm

我运行npm安装-g yo并得到以下结果

您的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
我遵循了troubelshooting,并将我的%appdata%npm放在我的%PATH%列表中nodejs之前,但仍然得到上面的响应

运气好吗

顺便说一句,这个平均堆栈是如此杂乱无章。有5000万种安装方法,所有这些方法都在他们的frontpage上宣传一个快速的两步安装,就像这是世界上最简单的事情一样。然后,当他们假设安装的20个先决条件不起作用时,每个人都会感到愚蠢。如果javascript在这些天引领潮流,那么Web应用开发的未来将是一片混乱。我觉得这几天很糟糕。英雄联盟
/endRant

程序包未正确检测到您的
npm
版本。安装的输出表明安装正确

提交一份bug报告:它可能只是没有正确地检测到您的NPM版本。此外,根据该输出,它看起来确实正确安装了
yo
。它不起作用吗?最后,如果您忽略了人们试图添加到Node.js中的一些BS宣传,那么您将在Node.js世界中过得更好。js和NPM实际上是非常可靠的系统,而且安装起来也很容易。但是,有很多人声称这是一种方式,事实是每个人的情况都有点不同。你基本上是说yo包未能检测到npm的错误可能只是yo包的错误,可以忽略吗?