Cannot read property 'createChildCompiler' of undefined
程序员文章站
2022-06-07 13:12:50
...
Module build failed (from ./node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 2)
Cannot read property 'createChildCompiler' of undefined
at PoolWorker.fromErrorObj (/home/pikachu/WebstormProjects/manager-web/node_modules/thread-loader/dist/WorkerPool.js:258:12)
把这个改了
vue.config.js
module.exports = {
// 省略其他
//添加web worker loader
configureWebpack: config => {
config.module.rules.push({
test: /\.worker\.js$/,
use: {
loader: 'worker-loader',
options: { inline: true }
}
})
},
// parallel: require('os').cpus().length > 1,
parallel: false,
}
parallel: false
能通过编译了
推荐阅读
-
Vue报错:Uncaught TypeError: Cannot assign to read only property’exports‘ of object
-
npm ERR! Cannot read property 'path' of null
-
js报错 Cannot read property 'getAttribute' of null
-
微信小程序报Cannot read property 'setData' of undefined的错误
-
webpack报错Cannot read property 'presetToOptions' of undefined
-
Extjs4---Uncaught TypeError: Cannot read property ‘items’ of undefined
-
JavaScript Uncaught TypeError: Cannot read property 'value' of null
-
Cannot read property 'tap' of undefined
-
Vue报错:Uncaught TypeError: Cannot assign to read only property’exports‘ of object’#
-
el-tooltip组件中content使用Vue-i18n报错TypeError: Cannot read property ‘$t‘ of null