Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'concurently' is not recognized as an internal or external command, operable program or batch file

Tags:

angular

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"
  }
}

I run:

npm start

and I get:

npm WARN package.json [email protected] No README.md file found!

> [email protected] 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! [email protected] 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 [email protected] 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

I tried also:

npm install -g concurrently

and also I got errors:

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!     <[email protected]>

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

and again I get errors:

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!     <[email protected]>

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!     <[email protected]>

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.

like image 886
Dariux Avatar asked Mar 05 '16 07:03

Dariux


2 Answers

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

https://chocolatey.org/packages?q=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.

Then I ran in CMD as admin:

npm install -g concurrently

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!

like image 127
Dariux Avatar answered Oct 18 '22 19:10

Dariux


npm install -g npm-windows-upgrade
npm install -g concurrently

This worked for me,on running cmd through admin

like image 11
Prashant K Avatar answered Oct 18 '22 18:10

Prashant K