webpack-dev-server: npm 错误 Windows_NT 7601

webpack-dev-server: npm error Windows_NT 7601

我在尝试命令时遇到以下错误:

$ npm run dev

我也使用过 nodejs cmd,git 并且还具有 cmd 的管理权限。

错误如下:

D:\IIT Samester\KAZ\ReactJSProjects\GitFrom\webpack-example-master\webpack-examp
le-master>npm run dev

> webpack-example@0.0.0 dev D:\IIT Samester\KAZ\ReactJSProjects\GitFrom\webpack-example-master\webpack-example-master
> webpack-dev-server --devtool eval --progress --colors --hot --content-base build/

 70% 1/1 build modulesevents.js:85
 throw er; // Unhandled 'error' event
        ^
Error: listen EACCES
at exports._errnoException (util.js:746:11)
at Server._listen2 (net.js:1129:19)
at listen (net.js:1172:10)
at net.js:1270:9
at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:81:16)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:99:10)

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "node" "C:\Users\hp\AppData\Roaming\npm\node_modules\npm\b
in\npm-cli.js" "run" "dev"
npm ERR! node v0.12.2
npm ERR! npm  v2.7.6
npm ERR! code ELIFECYCLE
npm ERR! webpack-example@0.0.0 dev: `webpack-dev-server --devtool eval --progress --colors --hot --content-base build/`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webpack-example@0.0.0 dev script 'webpack-dev-server--devtool eval --progress --colors --hot --content-base build/'.
npm ERR! This is most likely a problem with the webpack-example package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack-dev-server --devtool eval --progress --colors --hot --content-base build/
npm ERR! You can get their info via:
npm ERR!     npm owner ls webpack-example
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\IIT Samester\KAZ\ReactJSProjects\GitFrom\webpack-example-master\
webpack-example-master\npm-debug.log

D:\IIT Samester\KAZ\ReactJSProjects\GitFrom\webpack-example-master\webpack-example-master>

请帮忙解决问题。

是的,我已经自己解决了这个问题。

是端口的问题,没有别的。

我有其他程序可以在 端口 8080 上运行。

webpack-dev-server 也想默认使用那个端口。

所以我刚刚在 ProjectFolder [=36] 中将端口号 从 8080 更改为 8081(可以是任何其他有效的) =].js 文件.

另一种解决方案 是您可以停止该程序在端口 8080 上运行。

谢谢:)