2017-02-17 254 views
0

當我啓動'npm start'時它給出了以下錯誤。而localhost:8082不能正常工作。我嘗試了localhost:8080,但沒有任何工作。在Windows 10上安裝Node.js包(和npm)我無法知道如何安裝

$ npm start 
npm ERR! Windows_NT 6.1.7600 
npm ERR! argv 「C:\\Program Files\\nodejs\\node.exe」 「C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js」 「start」 
npm ERR! node v4.4.7 
npm ERR! npm v2.15.8 
npm ERR! path D:\myangular\package.json 
npm ERR! code ENOENT 
npm ERR! errno -4058 
npm ERR! syscall open 

npm ERR! enoent ENOENT: no such file or directory, open‘D:\myangular\package.json’ 
npm ERR! enoent This is most likely not a problem with npm itself 
npm ERR! enoent and is related to npm not being able to find a file. 
npm ERR! enoent 

npm ERR! Please include the following file with any support request: 
npm ERR! D:\myangular\npm-debug.log 

回答

2

請確保文件「D:\ myangular \ package.json」存在。另一種方法是,嘗試刪除node_modules文件夾並運行命令:npm install。然後重新運行你的命令:npm start

0

請先運行npm install命令。比你跑node your main file.js