我试图在ubuntu中安装yoeman
(通过终端),我无法执行命令yo,因为没有找到它。以下是我使用的步骤:
dmr@xxxxxxxxxxx:/home$ sudo npm install yo -g
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
-
> spawn-sync@1.0.15 postinstall /home/xxxxxxxxxxx/.npm/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/inquirer/node_modules/external-editor/node_modules/spawn-sync
> node postinstall
> spawn-sync@1.0.15 postinstall /home/xxxxxxxxxxx/.npm/lib/node_modules/yo/node_modules/tabtab/node_modules/inquirer/node_modules/external-editor/node_modules/spawn-sync
> node postinstall
/home/xxxxxxxxxxx/.npm/bin/yo -> /home/xxxxxxxxxxx/.npm/lib/node_modules/yo/lib/cli.js
/home/xxxxxxxxxxx/.npm/bin/yo-complete -> /home/xxxxxxxxxxx/.npm/lib/node_modules/yo/lib/completion/index.js
> yo@1.8.4 postinstall /home/xxxxxxxxxxx/.npm/lib/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
✔ No .bowerrc file in home directory
✔ No .yo-rc.json file in home directory
✖ npm version
Your npm version is outdated.
Upgrade to the latest version by running:
npm install -g npm
Found potential issues on your machine :(
yo@1.8.4 /home/xxxxxxxxxxx/.npm/lib/node_modules/yo
├── cli-list@0.1.8
├── titleize@1.0.0
├── async@1.5.2
├── humanize-string@1.0.1 (decamelize@1.2.0)
├── opn@3.0.3 (object-assign@4.1.0)
├── user-home@2.0.0 (os-homedir@1.0.1)
├── figures@1.7.0 (escape-string-regexp@1.0.5, object-assign@4.1.0)
├── string-length@1.0.1 (strip-ansi@3.0.1)
├── chalk@1.1.3 (escape-string-regexp@1.0.5, ansi-styles@2.2.1, supports-color@2.0.0, has-ansi@2.0.0, strip-ansi@3.0.1)
├── repeating@2.0.1 (is-finite@1.0.1)
├── sort-on@1.3.0 (arrify@1.0.1, dot-prop@2.4.0)
├── root-check@1.0.0 (sudo-block@1.2.0, downgrade-root@1.2.2)
├── yeoman-character@1.1.0 (supports-color@3.1.2)
├── parse-help@0.1.1 (execall@1.0.0)
├── cross-spawn@3.0.1 (lru-cache@4.0.1, which@1.2.10)
├── yosay@1.2.0 (ansi-regex@2.0.0, strip-ansi@3.0.1, ansi-styles@2.2.1, wrap-ansi@2.0.0, cli-boxes@1.0.0, pad-component@0.0.1, string-width@1.0.2, taketalk@1.0.0)
├── package-json@2.3.3 (registry-url@3.1.0, semver@5.3.0, rc@1.1.6)
├── got@5.6.0 (lowercase-keys@1.0.0, timed-out@2.0.0, is-redirect@1.0.0, is-plain-obj@1.1.0, is-stream@1.1.0, node-status-codes@1.0.0, duplexer2@0.1.4, is-retry-allowed@1.1.0, read-all-stream@3.1.0, unzip-response@1.0.0, object-assign@4.1.0, pinkie-promise@2.0.1, url-parse-lax@1.0.0, create-error-class@3.0.2, readable-stream@2.1.5, parse-json@2.2.0)
├── configstore@1.4.0 (object-assign@4.1.0, os-tmpdir@1.0.1, graceful-fs@4.1.6, xdg-basedir@2.0.0, uuid@2.0.2, osenv@0.1.3, write-file-atomic@1.2.0, mkdirp@0.5.1)
├── inquirer@0.11.4 (strip-ansi@3.0.1, ansi-regex@2.0.0, ansi-escapes@1.4.0, rx-lite@3.1.2, through@2.3.8, cli-width@1.1.1, string-width@1.0.2, readline2@1.0.1, cli-cursor@1.0.2, run-async@0.1.0)
├── npm-keyword@4.2.0 (object-assign@4.1.0, pinkie-promise@2.0.1, registry-url@3.1.0)
├── update-notifier@0.6.3 (is-npm@1.0.0, latest-version@2.0.0, semver-diff@2.1.0, boxen@0.3.1, configstore@2.0.0)
├── meow@3.7.0 (map-obj@1.0.1, trim-newlines@1.0.0, decamelize@1.2.0, object-assign@4.1.0, camelcase-keys@2.1.0, minimist@1.2.0, redent@1.0.0, loud-rejection@1.6.0, normalize-package-data@2.3.5)
├── fullname@2.1.0 (pify@2.3.0, pinkie-promise@2.0.1, npmconf@2.1.2)
├── read-pkg-up@1.0.1 (find-up@1.1.2, read-pkg@1.1.0)
├── yeoman-doctor@2.1.0 (object-values@1.0.0, log-symbols@1.0.2, semver@5.3.0, each-async@1.1.1, bin-version-check@2.1.0, twig@0.8.9)
├── insight@0.7.0 (object-assign@4.1.0, tough-cookie@2.3.1, lodash.debounce@3.1.1, os-name@1.0.3, inquirer@0.10.1, request@2.74.0)
├── lodash@3.10.1
├── yeoman-environment@1.6.3 (log-symbols@1.0.2, escape-string-regexp@1.0.5, text-table@0.2.0, untildify@2.1.0, debug@2.2.0, diff@2.2.3, globby@4.1.0, mem-fs@1.1.3, grouped-queue@0.3.2, inquirer@1.1.2, lodash@4.15.0)
└── tabtab@1.3.2 (object-assign@4.1.0, minimist@1.2.0, debug@2.2.0, mkdirp@0.5.1, npmlog@2.0.4, inquirer@1.1.2)
我执行yo,命令不被识别。
阅读结果,我看到npm版本没有安装到最新版本。我执行then:
sudo npm install -g npm
xxxxxx@xxxxxxxxxx:/home$ sudo npm install -g npm
/home/xxxxxx/npm/bin/npm -> /home/xxxxx/.npm/lib/node_modules/npm/bin/npm-cli.js
npm@3.10.6 /home/xxxxxx/.npm/lib/node_modules/npm
,获取当前版本为:
xxxxxxxx:/home$ npm -v
2.15.9
我不知道这是不是npm的最新版本。
发生了什么事?linux的命令有什么问题?
我找到解决办法了…
我是ubuntu的新手,今天当我打开ubuntu的时候,软件包已经损坏了…特别在NPM包中启动停止。
我重新安装了ubuntu,现在我可以安装最新版本的npm 3.10.6和它之后的你(约曼为angular)
我不知道在这种情况下我是否可以修复已安装的软件包