寫(xiě)Vue時(shí)碰到 或者從Github下載的vue項(xiàng)目也有這樣的錯(cuò)誤
building modules 1/1 modules 0 activeevents.js:183 throw er; // Unhandled 'error' event 這樣的錯(cuò)誤硼控,
馒索,原來(lái)是沒(méi)有設(shè)置host嬉愧,或者h(yuǎn)ost不對(duì),當(dāng)初在 webpack.dev.conf.js 里面找了半天呼伸,原來(lái)是在 \config\index.js里面更改
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// Various Dev Server settings
host: '192.168.0.106', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
...
},