Angular 2 npm start не работает Статус выхода 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! [email protected] start: `tsc && concurrently "tsc -w" "lite-ser
ver" `
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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:\Users\Timo\Desktop\OOSE Project\Projects\Button_for_Json\npm-deb
ug.log

C:\Users\USERNAME\Desktop\OOSE Project\Projects\Button_for_Json>npm

person Nick Alexander    schedule 02.12.2016    source источник
comment
У вас одинаковая версия node/npm на обеих машинах? Вы звонили npm install на второй машине до вызова npm start?   -  person osechet    schedule 02.12.2016
comment
вторая машина имеет более новую версию.   -  person Nick Alexander    schedule 05.12.2016


Ответы (2)


Теоретически npm start должен перейти к package.json и запустить ng serve, по крайней мере, в последней версии angular 2.

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

У вас есть это в вашем package.json?

В любом случае посмотрите здесь. Может быть полезно

person kimy82    schedule 02.12.2016
comment
У меня это есть: start: tsc && одновременно \npm run tsc:w\ \npm run lite\ . я попробую - person Nick Alexander; 02.12.2016
comment
Это не работает, он выдает другую ошибку, жалуясь на ng serve - person Nick Alexander; 02.12.2016
comment
Возможно, тогда не был установлен angular-cli. - person kimy82; 02.12.2016
comment
У меня он не установлен, но на моей машине он работает - person Nick Alexander; 02.12.2016

Похоже, у вас есть аналогичная проблема, как в этом вопросе. Не могли бы вы попробовать их решение?

В основном вы должны изменить начальное поле в package.json с

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

to

"start": "concurrently \"npm run tsc:w\" \"npm run lite\" "
person Ivan Vasiljevic    schedule 02.12.2016