TypeError: Cannot destructure property `compile` of 'undefined' or 'null'.
vue项目运行时,报错了,TypeError: Cannot destructure property compile of ‘undefined’ or ‘null’.F:\ybsvue\customer>npm run dev> project@1.0.0 dev F:\ybsvue\customer> webpack-dev-server --inl
·
vue项目运行时,报错了,TypeError: Cannot destructure property compile
of ‘undefined’ or ‘null’.
F:\ybsvue\customer>npm run dev
> project@1.0.0 dev F:\ybsvue\customer
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
TypeError: Cannot destructure property `compile` of 'undefined' or 'null'.
at addHooks (F:\ybsvue\customer\node_modules\webpack-dev-server\lib\Server.js:131:49)
at new Server (F:\ybsvue\customer\node_modules\webpack-dev-server\lib\Server.js:144:5)
at startDevServer (F:\ybsvue\customer\node_modules\webpack-dev-server\bin\webpack-dev-server.js:355:14)
at processOptions (F:\ybsvue\customer\node_modules\webpack-dev-server\bin\webpack-dev-server.js:309:5)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
at startup (internal/bootstrap/node.js:282:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
问题:webpack-dev-server版本过高引起,报错时版本:3.1.5
降低webpack-dev-server版本,重新安装,命令:npm install -D webpack-dev-server@3.0.0
重新安装3.0.0版本后,运行成功
更多推荐
已为社区贡献16条内容
所有评论(0)