Open kaizige10 opened 2 years ago
I am getting the same sort of error while trying to run storybook
vue 2.7.10
vue-loader 15.10.0
@vue/cli-service: 5.0.8
ModuleBuildError: Module build failed (from ./node_modules/vue-loader/dist/index.js):
TypeError: Cannot read property 'styles' of undefined
at Object.loader (/Users/f/webz/node_modules/vue-loader/dist/index.js:70:34)
I ended up adding
"resolutions": {
"vue-loader": "^15.10.0"
}
and its working (if your using vue2)
Version
16.8.3
Reproduction link
sfc.vuejs.org/
Steps to reproduce
my package.json:
my webpack config js, just show config about thread-loader
What is expected?
run
npx vue-cli-service build
successWhat is actually happening?
get error:
Additional Remarks
At first, I thought it was the problem of thread-loader, so I deleted the thread-loader in the Webpack configuration, and the packaging was successful. However, I think it might be that Vue-Loader passed the error to thread-loader, please help to check, thank you.
我一开始认为是thread-loader的问题,于是我把webpack配置中的thread-loader删除了,于是打包成功了。但是我认为这可能还是vue-loader将错误传递给了thread-loader,请帮忙看一下,谢谢。