2016-12-02 88 views
0

我的筆記本電腦上有一個角度2應用程序, 但是如果我的隊友使用git克隆它,那麼在npm start中會出現一個奇怪的錯誤。 他確實安裝了node.js並且文件相同。 這裏是錯誤消息:Angular 2 npm start不起作用退出狀態1

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 
+0

你有節點/ NPM的在兩臺機器上相同的版本?在調用'npm start'之前,你是否在第二臺機器上調用了'npm install'? – osechet

+0

第二臺機器有更新的版本。 – Nick

回答

0

理論上NPM啓動應該去的package.json,並開始納克服務,至少在最後角2版本。

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

你有沒有在你的package.json?

無論如何看here。可能是有用的

+0

我在那裏有:「start」:「tsc &&併發」npm運行tsc:w \「\」npm run lite \「」。我會嘗試你的洗手 – Nick

+0

這不起作用,他給出了一個不同的錯誤,抱怨ng服務 – Nick

+0

可能沒有安裝angular-cli。 – kimy82

0

好像你有類似的問題,如在this問題。你能試試他們的解決方案嗎

Basicly你應該從的package.json

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

更改啓動場

"start": "concurrently \"npm run tsc:w\" \"npm run lite\" " 
+0

我已經試過它不起作用 – Nick