javascript - Angular 种子克隆 "npm start"命令错误

标签 javascript angularjs node.js angularjs-directive npm

当我从 github 克隆 Angular 种子并运行 Node 服务器时,出现以下错误。我已将 Angular 种子克隆到现有项目目录。我不确定出了什么问题。但我收到以下错误。请帮忙

$ npm start

> StickyTodos@0.0.0 prestart C:\projects\StickyTodos
> npm install


> StickyTodos@0.0.0 postinstall C:\projects\StickyTodos
> bower install


> StickyTodos@0.0.0 start C:\projects\StickyTodos
> http-server -a localhost -p 8000 -c-1

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE 127.0.0.1:8000
    at Object.exports._errnoException (util.js:860:11)
    at exports._exceptionWithHostPort (util.js:883: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:63:16)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:82: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 v5.0.0
npm ERR! npm  v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! StickyTodos@0.0.0 start: `http-server -a localhost -p 8000 -c-1`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the StickyTodos@0.0.0 start script 'http-server -a localhost -p 8000 -c-1'.
npm ERR! This is most likely a problem with the StickyTodos 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
npm ERR! You can get their info via:
npm ERR!     npm owner ls StickyTodos
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\projects\StickyTodos\npm-debug.log

最佳答案

错误 Error: listen EADDRINUSE 127.0.0.1:8000 解释说某些东西已经绑定(bind)到端口 8000。

就像您在 Windows 上一样,在提升的命令提示符下运行 netstat -a -b(右键单击开始按钮并按命令提示符(管理员))应该会显示什么已经在监听端口 8000 .

只需停止该进程,或者绑定(bind)到另一个空闲端口。

关于javascript - Angular 种子克隆 "npm start"命令错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36812111/

相关文章:

javascript - 下面的代码块有什么作用,我需要它吗?

javascript - 下载的pdf格式不正确

javascript - Angular ng-repeat范围问题

javascript - AngularJs 指令 : call method from parent scope within template

javascript - 在 process.stdin 的可读流中插入条件语句

node.js - 从单个 REDIS 实例读取的 Nodejs 集群架构

javascript - 尝试在 javascript 中动态处理对象属性

Javascript 使用 if 语句声明变量

javascript - React 链接与标签和箭头函数

javascript - AngularJS - 来自 JSON 字符串的数据绑定(bind)