简体   繁体   English

angularjs项目的npm启动问题

[英]npm start issues for angularjs project

working on a website, when I started having having issues running npm start for it. 在网站上工作时,当我开始遇到运行npm start的问题时。 It's an angular project. 这是一个有角度的项目。 Can anyone help me? 谁能帮我? It was working fine yesterday, I've tried everything from online, error below: 昨天一切正常,我已经尝试了所有在线操作,以下错误:

> $ npm start
>     
>     > angular-seed@0.0.0 prestart C:\dev\HyprPortal
>     > npm install
>     
>     npm WARN package.json Dependency 'karma' exists in both dependencies and devDependencies, using 'karma@^1.0.0' from
> dependencies
>     
>     > angular-seed@0.0.0 postinstall C:\dev\HyprPortal
>     > bower install
>     
>     
>     > angular-seed@0.0.0 start C:\dev\HyprPortal
>     > http-server -a localhost -p 8000 -c-1 ./app
>     
>     events.js:141
>           throw er; // Unhandled 'error' event
>           ^
>     
>     Error: listen EADDRINUSE 127.0.0.1:8000
>         at Object.exports._errnoException (util.js:870:11)
>         at exports._exceptionWithHostPort (util.js:893:20)
>         at Server._listen2 (net.js:1234:14)
>         at listen (net.js:1270:10)
>         at net.js:1379:9
>         at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:64:16)
>         at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:83:10)
>     
>     npm ERR! Windows_NT 10.0.10586
>     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.5
>     npm ERR! npm  v2.15.5
>     npm ERR! code ELIFECYCLE
>     npm ERR! angular-seed@0.0.0 start: `http-server -a localhost -p 8000 -c-1 ./app`
>     npm ERR! Exit status 1
>     npm ERR!
>     npm ERR! Failed at the angular-seed@0.0.0 start script 'http-server -a localhost -p 8000 -c-1 ./app'.
>     npm ERR! This is most likely a problem with the angular-seed package,
>     npm ERR! not with npm itself.
>     npm ERR! Tell the author that this fails on your system:
>     npm ERR!     http-server -a localhost -p 8000 -c-1 ./app
>     npm ERR! You can get information on how to open an issue for this project with:
>     npm ERR!     npm bugs angular-seed
>     npm ERR! Or if that isn't available, you can get their info via:
>     npm ERR!
>     npm ERR!     npm owner ls angular-seed
>     npm ERR! There is likely additional logging output above.
>     
>     npm ERR! Please include the following file with any support request:
>     npm ERR!     C:\dev\HyprPortal\npm-debug.log

Your error is EADDRINUSE 127.0.0.1:8000 . 您的错误是EADDRINUSE 127.0.0.1:8000 Or in other words - ERROR: ADDRESS IN USE 127.0.0.1:8000 . 换句话说- ERROR: ADDRESS IN USE 127.0.0.1:8000 Meaning, something is already listening on port 8000. 这意味着端口8000上已经在侦听某些内容。

Make sure you aren't trying to run npm start multiple times. 确保您没有尝试多次运行npm start Or you can use netstat -ab in an Administrative Command Prompt, to see what is listening on that port and kill the process or change the port of your node server. 或者,您可以在管理命令提示符中使用netstat -ab来查看该端口上正在侦听的内容,并netstat -ab该进程或更改节点服务器的端口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM