nodejs异常之-Error: listen EACCES 127.0.0.1:8000
来源:互联网 发布:事业单位会计软件 编辑:程序博客网 时间:2024/06/02 02:21
此文章为转载,如若无意侵犯版权,请及时告知
原地址为 http://blog.csdn.net/y2010081134/article/details/72800812
异常信息
Error: listen EACCES 127.0.0.1:8000 at Object.exports._errnoException (util.js:1018:11) at exports._exceptionWithHostPort (util.js:1041:20) at Server._listen2 (net.js:1245:19) at listen (net.js:1294:10) at net.js:1404:9 at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:62:16) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:81:10)npm ERR! Windows_NT 10.0.14393npm ERR! argv "D:\\nodejs\\node.exe" "D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"npm ERR! node v6.10.3npm ERR! npm v3.10.10npm ERR! code ELIFECYCLEnpm ERR! angular-phonecat@0.0.0 start: `http-server ./app -a localhost -p 8000 -c-1`npm ERR! Exit status 1npm ERR!npm ERR! Failed at the angular-phonecat@0.0.0 start script 'http-server ./app -a localhost -p 8000 -c-1'.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-phonecat package,npm ERR! not with npm itself.npm ERR! Tell the author that this fails on your system:npm ERR! http-server ./app -a localhost -p 8000 -c-1npm ERR! You can get information on how to open an issue for this project with:npm ERR! npm bugs angular-phonecatnpm ERR! Or if that isn't available, you can get their info via:npm ERR! npm owner ls angular-phonecatnpm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request:npm ERR! E:\Git\Repository\angular-phonecat\npm-debug.log
解决方法
异常为8000端口被占用导致的,查看windows下8000端口占用情况
E:\Git\Repository\angular-phonecat>netstat -ano|findstr "8000" TCP 0.0.0.0:8000 0.0.0.0:0 LISTENING 18480 TCP 127.0.0.1:8000 127.0.0.1:50236 TIME_WAIT 0 TCP 127.0.0.1:8000 127.0.0.1:50237 TIME_WAIT 0 TCP 127.0.0.1:8000 127.0.0.1:50238 TIME_WAIT 0 TCP 127.0.0.1:8000 127.0.0.1:50239 TIME_WAIT 0 TCP 127.0.0.1:8000 127.0.0.1:50240 TIME_WAIT 0 TCP 127.0.0.1:8000 127.0.0.1:50286 TIME_WAIT 0 TCP 127.0.0.1:50285 127.0.0.1:8000 TIME_WAIT 0 UDP 0.0.0.0:8000 *:* 18480
因为进程0为系统进程,执行“taskkill /pid 0”后发现杀不掉。所以,另想办法,换端口,如下:
在node的安装根目录下,找到package.json,搜索8000,然后替换为8888
然后再在命令行执行命令npm start,启动成功
浏览器中输入http://localhost:8888,可以看到成功访问
阅读全文
0 0
- nodejs异常之-Error: listen EACCES 127.0.0.1:8000
- nodejs异常之-Error: listen EACCES 127.0.0.1:8000
- nodejs 监听端口报错 Error: listen EACCES
- Error: listen EACCES 0.0.0.0:8080
- vue运行项目时报错“Error: listen EACCES 0.0.0.0:8080”解决方法
- NodeJS运行时抛出: Error: listen EADDRINUSE :::3000
- Linux端口占用,nodejs 监听80端口,Error: listen EADDRINUSE
- listen error
- Error: EACCES: permission denied
- ionic Error: spawn EACCES
- ionic Error: spawn EACCES
- Error: spawn EACCES
- listen EADDRINUSE 127.0.0.1:3000
- listen EADDRINUSE 127.0.0.1:3000
- windows 下 Error: listen EADDRINUSE :::8000解决w
- ionic 打包遇到"Error: spawn EACCES".
- Vue项目启动时报 Error: spawn EACCES
- npm ERR! Error: EACCES: permission denied, access
- 51nod 1396 还是01串 【思维题】
- 关于二进制位移“>>”和“>>>”的区别小结
- 作业3
- C#基础(3)——异常捕获与断点调试
- 分布式ID生成器
- nodejs异常之-Error: listen EACCES 127.0.0.1:8000
- 牛客网初级项目课第一节
- linux shell之tput和stty
- HashMap、HashTable、ConcurrentHashMap
- Binary Search:81. Search in Rotated Sorted Array II
- 使用solidworks插件获取urdf包
- 51nod 1163 最高的奖励 【贪心 ,并查集】
- 论文阅读(1)——医疗数据分析
- Git使用(4)修改提交结果、版本回退与冲突解决