Angular 2 NPM启动不起作用退出状态1



我的笔记本电脑上有一个Angular 2应用程序。但是,如果我的队友用git克隆,他会在NPM开始时会出现一个奇怪的错误。他确实已安装了node.js,并且文件相同。这是错误消息:

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\
node_modules\npm\bin\npm-cli.js" "start"
npm ERR! node v7.2.0
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! angular-quickstart@1.0.0 start: `tsc && concurrently "tsc -w" "lite-ser
ver" `
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-quickstart@1.0.0 start script 'tsc && concurrentl
y "tsc -w" "lite-server" '.
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 pa
ckage,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     tsc && concurrently "tsc -w" "lite-server"
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!     C:UsersTimoDesktopOOSE ProjectProjectsButton_for_Jsonnpm-deb
ug.log
C:UsersUSERNAMEDesktopOOSE ProjectProjectsButton_for_Json>npm

在理论上 npm start 应该转到package.json并至少在最后一个Angular 2版本中开始 ng服务

  "scripts": {
    "start": "ng serve",

您包含在包装中吗?

无论如何在这里看。可能很有用

看来您在这个问题中有类似的问题。您可以尝试他们的解决方案吗?

基本上,您应该更改package.json中的起始字段。

"start": "tsc && concurrently "npm run tsc:w" "npm run lite" "

to

"start": "concurrently "npm run tsc:w" "npm run lite" "

最新更新