vue-loader icon indicating copy to clipboard operation
vue-loader copied to clipboard

Cannot read properties of undefined (reading 'NormalModule')

Open albizeka opened this issue 3 years ago • 2 comments

Version

16.8.3

Reproduction link

sfc.vuejs.org/

Steps to reproduce

I updated the vue 3 to vue 3 typescript and this is happened

What is actually happening?

I'm updating the vue 3 project to vue 3 typescript and this is the error i'm encountering:

ERROR TypeError: Cannot read properties of undefined (reading 'NormalModule') TypeError: Cannot read properties of undefined (reading 'NormalModule') at VueLoaderPlugin.apply (/Users/albizeka/Desktop/project/resources/client/node_modules/vue-cli-plugin-vue-next/node_modules/vue-loader/dist/pluginWebpack5.js:44:47) at webpack (/Users/albizeka/Desktop/project/resources/client/node_modules/@vue/cli-service/node_modules/webpack/lib/webpack.js:51:13) at serve (/Users/albizeka/Desktop/project/resources/client/node_modules/@vue/cli-service/lib/commands/serve.js:137:22) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

I read some of things that i found on another pages, like to downgrade the webpack and ts-loader to 8.2.0 but none of this seemed to work.

albizeka avatar Jun 29 '22 15:06 albizeka

For me this seemed to be due to an incompatible webpack version (coming from an old version of webpack-stream) - I upgraded from 4.46.0 to 5.74.0 and the issue seemed to be resolved. That makes me think the peer dependencies for vue-loader might not be quite correct.

(This change tipped me off https://github.com/vuejs/vue-loader/pull/1884).

michaelowolf avatar Sep 01 '22 13:09 michaelowolf

still face the same problem TypeError: Cannot read properties of undefined (reading 'NormalModule')

Abdulhai-Mohamed avatar Jul 05 '23 11:07 Abdulhai-Mohamed