Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vue TypeError: Cannot read properties of undefined (reading 'NormalModule')

Tags:

vue.js

I'm using 2 machines to test and develop a small web app written in vue. For the project I use github to easily work on both machines.

Up until yesterday I was working on macos without an issue. Today I tried to get the project up and running on my windows machine but I'm stuck with this error:

TypeError: Cannot read properties of undefined (reading 'NormalModule')

So far I've tried the following:

  1. (re)installing the node_modules folder using npm install
  2. deleting node_modules and package-lock.json and running npm install again
  3. updating node, npm and vue to the same version on both machines

unfortunately the error still exists on my windows machine. I have no issue letting the project run on my macbook.

TypeError: Cannot read properties of undefined (reading 'NormalModule')
at VueLoaderPlugin.apply (C:\dev\prj\node_modules\vue-loader-v16\dist\pluginWebpack5.js:44:47)
    at webpack (C:\dev\prj\node_modules\@vue\cli-service\node_modules\webpack\lib\webpack.js:51:13)
    at serve (C:\dev\prj\node_modules\@vue\cli-service\lib\commands\serve.js:163:22)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
like image 919
lechnerio Avatar asked Nov 14 '25 09:11

lechnerio


1 Answers

after looking for quite some time I ended up reinstalling a webpack version that I had installed.

after running npm install [email protected] --save everything worked quite well again.

like image 159
lechnerio Avatar answered Nov 17 '25 09:11

lechnerio