Iview-admin: 执行npm run dev出错求助

Created on 22 Nov 2017  ·  4Comments  ·  Source: iview/iview-admin

Mac OS 10.12.6
node : v9.2.0
npm : 5.5.1
webpack: 3.8.1
执行完npm install,然后执行npm run dev出现以下错误
MacBook:iview-admin ricky$ npm run dev

[email protected] dev /Users/ricky/codes/iview-admin/iview-admin
webpack-dev-server --content-base ./ --open --inline --hot --compress --config build/webpack.dev.config.js

HappyPack: Option 'cache' has been deprecated. Configuring it will cause an error to be thrown in future versions.
Happy[happybabel]: Version: 4.0.0. Threads: 4 (shared pool)
(node:12148) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
events.js:136
throw er; // Unhandled 'error' event
^

Error: listen EADDRNOTAVAIL 42.123.125.237:8080
at Object._errnoException (util.js:1031:13)
at _exceptionWithHostPort (util.js:1052:20)
at Server.setupListenHandle [as _listen2] (net.js:1350:19)
at listenInCluster (net.js:1408:12)
at GetAddrInfoReqWrap.doListen [as callback] (net.js:1523:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:102:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: webpack-dev-server --content-base ./ --open --inline --hot --compress --config build/webpack.dev.config.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ricky/.npm/_logs/2017-11-22T13_12_03_642Z-debug.log

All 4 comments

错误说明很清楚

我是新手,帮忙一下,是端口被占用是吗?在哪里可以修改端口吗?

我是新手,帮忙一下,是端口被占用是吗?在哪里可以修改端口吗?

虽然过了很久, 这应该是happypack 中 option 的cache被废弃了

我出现这个问题是node 版本导致的,降低node 版本就好了,我的node 已经到了11,降到9就执行成功了。

Was this page helpful?
0 / 5 - 0 ratings