zoukankan      html  css  js  c++  java
  • npm run server报错

    从git上clone的vue项目npm install后npm run server报错

    $ npm run dev
    
    > lufei@1.0.0 dev E:pythonProjectluffyluffyvue
    > webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
    
     10% building modules 0/1 modules 1 active ... webpack/hot/dev-server ./src/main 10% building modules 1/2
    modules 1 active ...ode_moduleswebpackhotdev-server 10% building modules 2/3 modules 1 active
    ...honProjectluffyluffyvuesrcmain 12% building modules 24/44 modules 20 active ...element-uilib heme-chalkindex.cssevents.js:174 throw er; // Unhandled 'error' event ^ Error: listen EADDRNOTAVAIL: address not available 12.20.22.14:8080 at Server.setupListenHandle [as _listen2] (net.js:1260:19) at listenInCluster (net.js:1325:12) at GetAddrInfoReqWrap.doListen [as callback] (net.js:1458:7) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:62:10) Emitted 'error' event at: at emitErrorNT (net.js:1304:8) at process._tickCallback (internal/process/next_tick.js:63:19) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! lufei@1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the lufei@1.0.0 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! C:Users14612AppDataRoaming pm-cache\_logs2019-06-16T14_53_41_465Z-debug.log

    最后发现是config/index.js中的host地址问题,把host地址改成本地地址即可

  • 相关阅读:
    LOL 计蒜客
    cf1486 D. Max Median
    P3567 [POI2014]KUR-Couriers
    dp 求物品组合情况
    黑暗爆炸
    hdu5306 Gorgeous Sequence
    P4609 [FJOI2016]建筑师
    cf 1342 E. Placing Rooks
    重修dp-背包
    acwing 2154. 梦幻布丁
  • 原文地址:https://www.cnblogs.com/chen55555/p/11037379.html
Copyright © 2011-2022 走看看