我跟着the instructions on angular.io在Mac OS X 10.12上设置并运行了angular-quickstart(Angular 2)项目。不幸的是我收到以下错误:
% npm start
> angular-quickstart@1.0.0 prestart /Users/will/Documents/Projects/test/angular2-test
> npm run build
> angular-quickstart@1.0.0 build /Users/will/Documents/Projects/test/angular2-test
> tsc -p src/
> angular-quickstart@1.0.0 start /Users/will/Documents/Projects/test/angular2-test
> concurrently "npm run build:watch" "npm run serve"
[0] Unknown option: `-l'
[0] Usage: tcsh [ -bcdefilmnqstvVxX ] [ argument ... ].
[1] Unknown option: `-l'
[1] Usage: tcsh [ -bcdefilmnqstvVxX ] [ argument ... ].
[0] npm run build:watch exited with code 1
[1] npm run serve exited with code 1
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/Cellar/node/6.2.2/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.2.2
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! angular-quickstart@1.0.0 start: `concurrently "npm run build:watch" "npm run serve"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-quickstart@1.0.0 start script 'concurrently "npm run build:watch" "npm run serve"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! concurrently "npm run build:watch" "npm run serve"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular-quickstart
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/will/Documents/Projects/test/angular2-test/npm-debug.log
我阅读了有关angular-quickstart和mac的所有帖子,但遗憾的是没有找到任何有用的内容。我确实升级了nodejs和npm,并且还手动安装了“并发”,尽管这可能不是问题所在。我可以分别启动这两个命令(npm run build:watch和npm run serve),看起来工作正常(代码会在更改时自动编译,浏览器会更新)。那么有人知道这里可能出现什么问题吗?
谢谢!