cache failed module status_2019-06-24 解决vue运行时出错

错误1:

PS E:\IdeaProjects\template\vueAsset> npm run dev

> vue-admin-template@3.8.0 dev E:\IdeaProjects\template\vueAsset

> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

10% building modules 1/1 modules 0 activeevents.js:174

throw er; // Unhandled 'error' event

^

Error: listen EADDRNOTAVAIL: address not available 192.168.100.109:9527

at Server.setupListenHandle [as _listen2] (net.js:1262:19)

at listenInCluster (net.js:1327:12)

at doListen (net.js:1460:7)

at process._tickCallback (internal/process/next_tick.js:63:19)

at Function.Module.runMain (internal/modules/cjs/loader.js:832:11)

at startup (internal/bootstrap/node.js:283:19)

at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

Emitted 'error' event at:

at emitErrorNT (net.js:1306:8)

at process._tickCallback (internal/process/next_tick.js:63:19)

[... lines matching original stack trace ...]

at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! vue-admin-template@3.8.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 vue-admin-template@3.8.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!    E:\nodejs\node_cache\_logs\2019-07-24T08_37_38_098Z-debug.log

解决:

因为机器重启,DHCP重新分配了IP。重新配置工程绑定当前分配的IP就可以了,或者修改本机的IP为静态IP,问题就解决了。

1:打开cmd,命令行运行 ipconfig,得到本机的ip地址:

2:找到config文件夹下的index.js文件,打开后,将host的值改为我上一步所得到的ipv4即可

错误2:

Module build failed (from ./node_modules/vue-loader/lib/index.js):

Error: [vue-loader] vue-template-compiler must be installed as a peer dependency, or a compatible compiler implementation must be passed via options.

at loadTemplateCompiler (E:\IdeaProjects\template\vueAsset\node_modules\vue-loader\lib\index.js:21:11)

at Object.module.exports (E:\IdeaProjects\template\vueAsset\node_modules\vue-loader\lib\index.js:65:35)

解决——输入即可:

npm install vue-template-compiler -D

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值