2017-02-17 262 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