“一致"不被识别为内部或外部命令,可操作程序或批处理文件 [英] 'concurently' is not recognized as an internal or external command, operable program or batch file

查看:122
本文介绍了“一致"不被识别为内部或外部命令,可操作程序或批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试运行angular 2项目.有package.json:

I try to run angular 2 project. There is package.json:

{
  "name": "angular2-quickstart",
  "version": "1.0.0",
  "scripts": {
    "start": "concurrently \"npm run tsc:w\" \"npm run lite\" ",
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "lite": "lite-server",
    "typings": "typings",
    "postinstall": "typings install"
  },
  "license": "ISC",
  "dependencies": {
    "angular2": "2.0.0-beta.7",
    "systemjs": "0.19.22",
    "es6-promise": "^3.0.2",
    "es6-shim": "^0.33.3",
    "reflect-metadata": "0.1.2",
    "rxjs": "5.0.0-beta.2",
    "zone.js": "0.5.15"
  },
  "devDependencies": {
    "concurrently": "^2.0.0",
    "lite-server": "^2.1.0",
    "typescript": "^1.8.2",
    "typings":"^0.6.8"
  }
}

我跑步:

npm start

我得到:

npm WARN package.json angular2-quickstart@1.0.0 No README.md file found!

> angular2-quickstart@1.0.0 start E:\other\dropbox\Dropbox\programavimas\kodo pavyzdziai\htdocs\angular_2\egghead
> concurrently "npm run tsc:w" "npm run lite"

'concurrently' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! angular2-quickstart@1.0.0 start: `concurrently "npm run tsc:w" "npm run lite" `
npm ERR! `cmd "/c" "concurrently \"npm run tsc:w\" \"npm run lite\" "` failed with 1
npm ERR!
npm ERR! Failed at the angular2-quickstart@1.0.0 start script.
npm ERR! This is most likely a problem with the angular2-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     concurrently "npm run tsc:w" "npm run lite"
npm ERR! You can get their info via:
npm ERR!     npm owner ls angular2-quickstart
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! cwd E:\other\dropbox\Dropbox\programavimas\kodo pavyzdziai\htdocs\angular_2\egghead
npm ERR! node -v v0.8.9
npm ERR! npm -v 1.1.61
npm ERR! code ELIFECYCLE
npm

我也尝试过:

npm install -g concurrently

我也遇到错误:

npm http GET https://registry.npmjs.org/concurrently
npm http 304 https://registry.npmjs.org/concurrently
npm http GET https://registry.npmjs.org/concurrently/-/concurrently-2.0.0.tgz
npm http 200 https://registry.npmjs.org/concurrently/-/concurrently-2.0.0.tgz
npm http GET https://registry.npmjs.org/bluebird/2.9.6
npm http GET https://registry.npmjs.org/chalk/0.5.1
npm http GET https://registry.npmjs.org/commander/2.6.0
npm http GET https://registry.npmjs.org/cross-spawn
npm http GET https://registry.npmjs.org/lodash/3.1.0
npm http GET https://registry.npmjs.org/moment
npm http GET https://registry.npmjs.org/rx/2.3.24
npm http 200 https://registry.npmjs.org/cross-spawn
npm ERR! Error: No compatible version found: cross-spawn@'^0.2.9'
npm ERR! Valid install targets:
npm ERR! ["0.1.0","0.1.1","0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.7","0.2.0","0.2.1","0.2.2","0.2.3","0.2.4","0.2.5","0.2.6","0.2.7","0.2.8","0.2.9","0.3.0","0.4.0","0.4.1","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","2.0.0","2.0.1","2.1.0","2.1.1","2.1.2","2.1.3","2.1.4","2.1.5"]
npm ERR!     at installTargetsError (C:\Program Files\nodejs\node_modules\npm\lib\cache.js:553:10)
npm ERR!     at C:\Program Files\nodejs\node_modules\npm\lib\cache.js:477:15
npm ERR!     at saved (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\get.js:138:7)
npm ERR!     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:220:7
npm ERR!     at Object.oncomplete (fs.js:297:15)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "concurrently"
npm ERR! cwd E:\other\dropbox\Dropbox\programavimas\kodo pavyzdziai\htdocs\angular_2\egghead
npm ERR! node -v v0.8.9
npm ERR! npm -v 1.1.61
npm http 200 https://registry.npmjs.org/moment
npm http 200 https://registry.npmjs.org/commander/2.6.0
npm http GET https://registry.npmjs.org/commander/-/commander-2.6.0.tgz
npm http 200 https://registry.npmjs.org/chalk/0.5.1
npm http GET https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz
npm http 200 https://registry.npmjs.org/bluebird/2.9.6
npm http GET https://registry.npmjs.org/bluebird/-/bluebird-2.9.6.tgz
npm http 200 https://registry.npmjs.org/commander/-/commander-2.6.0.tgz
npm http 200 https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz
npm http 200 https://registry.npmjs.org/bluebird/-/bluebird-2.9.6.tgz
npm http 200 https://registry.npmjs.org/rx/2.3.24
npm http 200 https://registry.npmjs.org/lodash/3.1.0
npm http GET https://registry.npmjs.org/lodash/-/lodash-3.1.0.tgz
npm http GET https://registry.npmjs.org/rx/-/rx-2.3.24.tgz
npm http 200 https://registry.npmjs.org/lodash/-/lodash-3.1.0.tgz
npm http 200 https://registry.npmjs.org/rx/-/rx-2.3.24.tgz
npm

也许我正在运行旧版本的节点.我尝试升级:

Maybe I am running old version of node. I try to upgrade:

npm install -g npm

再次出现错误:

npm http GET https://registry.npmjs.org/npm
npm http 304 https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm/-/npm-3.8.0.tgz
npm http 200 https://registry.npmjs.org/npm/-/npm-3.8.0.tgz
npm ERR! tar pack Error reading C:\cygwin\tmp\npm-6108\1457164431986-0.6791366613470018\package
npm ERR! TypeError: Cannot call method 'filter' of undefined
npm ERR!     at Packer.IgnoreReader.addIgnoreRules (C:\Program Files\nodejs\node_modules\npm\node_modules\fstream-npm\node_modules\fstream-ignore\ignore.js:148:13)
npm ERR!     at Packer.IgnoreReader.addIgnoreFile (C:\Program Files\nodejs\node_modules\npm\node_modules\fstream-npm\node_modules\fstream-ignore\ignore.js:133:10)
npm ERR!     at fs.readFile (fs.js:176:14)
npm ERR!     at fs.close (C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:92:5)
npm ERR!     at Object.oncomplete (fs.js:297:15)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "npm"
npm ERR! cwd E:\other\dropbox\Dropbox\programavimas\kodo pavyzdziai\htdocs\angular_2\egghead
npm ERR! node -v v0.8.9
npm ERR! npm -v 1.1.61
npm ERR! type non_object_property_call
npm ERR! addLocalDirectory Could not pack "C:\\cygwin\\tmp\\npm-6108\\1457164431986-0.6791366613470018\\package" to "C:\\Users\\Darius\\AppData\\Roaming\\npm-cache\\npm\\3.8.0\\package.tgz"
npm ERR! SyntaxError: Unexpected end of input
npm ERR!     at Object.parse (native)
npm ERR!     at Packer.readRules (C:\Program Files\nodejs\node_modules\npm\node_modules\fstream-npm\fstream-npm.js:189:33)
npm ERR!     at Packer.IgnoreReader.addIgnoreFile (C:\Program Files\nodejs\node_modules\npm\node_modules\fstream-npm\node_modules\fstream-ignore\ignore.js:132:22)
npm ERR!     at fs.readFile (fs.js:176:14)
npm ERR!     at fs.close (C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:92:5)
npm ERR!     at Object.oncomplete (fs.js:297:15)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "npm"
npm ERR! cwd E:\other\dropbox\Dropbox\programavimas\kodo pavyzdziai\htdocs\angular_2\egghead
npm ERR! node -v v0.8.9
npm ERR! npm -v 1.1.61
npm ERR! file C:\cygwin\tmp\npm-6108\1457164431986-0.6791366613470018\package\node_modules\read-package-tree\test\fixtures\bad\package.json
npm ERR! path C:\cygwin\tmp\npm-6108\1457164431986-0.6791366613470018\package\node_modules\read-package-tree\test\fixtures\bad
npm ERR! type unexpected_eos
npm ERR! fstream_path C:\cygwin\tmp\npm-6108\1457164431986-0.6791366613470018\package\node_modules\read-package-tree\test\fixtures\bad
npm ERR! fstream_type Directory
npm ERR! fstream_class Packer
npm ERR! fstream_stack Packer.readRules (C:\Program Files\nodejs\node_modules\npm\node_modules\fstream-npm\fstream-npm.js:192:10)
npm ERR! fstream_stack Packer.IgnoreReader.addIgnoreFile (C:\Program Files\nodejs\node_modules\npm\node_modules\fstream-npm\node_modules\fstream-ignore\ignore.js:132:22)
npm ERR! fstream_stack fs.readFile (fs.js:176:14)
npm ERR! fstream_stack fs.close (C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:92:5)
npm ERR! fstream_stack Object.oncomplete (fs.js:297:15)
npm

该如何解决?我不知道在这里添加更多的信息.

How to fix that? I do not know what more info to add here.

推荐答案

在rgvassar评论后,我尝试检查巧克力.我看到这里不推荐使用npm:

After rgvassar comment, I tried to check the chocolate. I saw that npm is deprecated here:

https://chocolatey.org/packages?q=npm

但是我也看到npm带有nodejs.因此,我决定升级nodejs.升级nodejs后,我看到npm也在升级.

But I also saw that npm comes with nodejs. So I decided to upgrade nodejs. After upgrade of nodejs, I saw that npm is upgrade also.

然后我以admin身份进入CMD:

Then I ran in CMD as admin:

npm install -g concurrently

我还看到cygwin不支持npm.但是由于cygwin也可以访问Windows cmd命令,据我了解,我仍然可以使用它,只需要在CMD上进行安装即可.

I saw also that npm is not supported on cygwin. But since cygwin also can access windows cmd commands, I still can use on it as I understand, just need to do installation on CMD.

它已成功安装,现在不再抛出此错误.

It was installed succesfully and now does not throw this error anymore.

非常感谢,尤其是对于快速评论!

Thanks a lot, especially for quick comments!

这篇关于“一致"不被识别为内部或外部命令,可操作程序或批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆