Home > other >  TypeError: Cannot read property 'NormalModule' of undefined
TypeError: Cannot read property 'NormalModule' of undefined

Time:01-22

I am working on a big project and I cannot run it anymore because of this error:

When I run npm run serve

 ERROR  TypeError: Cannot read property 'NormalModule' of undefined
TypeError: Cannot read property 'NormalModule' of undefined
    at VueLoaderPlugin.apply (/Users/<user>/muso-ninjas/node_modules/vue-loader-v16/dist/pluginWebpack5.js:44:47)
    at webpack (/Users/<user>/muso-ninjas/node_modules/@vue/cli-service/node_modules/webpack/lib/webpack.js:51:13)
    at serve (/Users/<user>/muso-ninjas/node_modules/@vue/cli-service/lib/commands/serve.js:163:22)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Please help me because I am stuck and I would like to go with my project.

CodePudding user response:

Try this first:

  1. In your project root, run npm install. Maybe someone else on your project has changed/added a dependendency, and pulling from your git repo got you the code that relies on this, but won't get you the dependency itself.

If that doesn't fix your issue, try this:

  1. Remove the node_modules folder in your project root.
  2. Update your Node.js version to the latest 16.x version.
    2.1 Verify the update has worked by issuing node -v in the terminal.
  3. Update your npm: Run npm i -g npm in the terminal.
    3.1 Very the update has worked by issuing npm -v in the terminal.
  4. Run npm install in your project's root folder.

If this doesn't fix your issue, you need to find help from someone else on your team.

  •  Tags:  
  • Related