7

I want to do an upgrade from Angular 7 to 8. I have installed @angular-devkit/[email protected], uninstalled et reinstalled node modules, but I always got this problem : Cannot find module 'webpack/lib/ParserHelpers' When I did npm fix audit I got another type of error which is : An unhandled exception occurred: Job name "..getProjectMetadata" does not exist. See "C:\Users\Surface\AppData\Local\Temp\ng-urmmUP\angular-errors.log" for further details.enter image description here

1
  • I am struggling with the same issue. Any luck on resolving this? I've tried everything I was able to find so far to no avail. Commented Nov 6, 2020 at 7:38

5 Answers 5

9

First of all, make sure that NPM is up-to-date.

npm i -g npm

Check version of Webpack. The version 5 (and after) is not currently supported by @angular-devkit/[email protected] (source).

Clean all :

remove node_modules folder and package-lock.json file

rm package-lock.json && rm -R node_modules

remove dist folder

Clear npm cache :

npm cache clean --force

To see which version are installed :

npm ls webpack

How to resolve ?

npm uninstall webpack
npm install --save-dev [email protected]
Sign up to request clarification or add additional context in comments.

Comments

0

In my case it has been solved

  1. npm audit fix / sudo npm audit fix (ubuntu)

  2. Adding the following code in tsconfig.json "angularCompilerOptions": { "enableIvy": false }

1 Comment

Unfortunately for me neither
0

you can use npm ci

description

Comments

0

I had the same error while working with npm workspaces. You can add to your package.json:

  • Without using the npm workspace (and therefore having the issue), i guess the following should work:
"overrides": {
  "@angular-devkit/[email protected]": {
    "worker-plugin": {
      "webpack": "^4.39.2"
     }
  }
}
  • However, i fixed it with:
"devDependencies": {
  // You other dev dependencies here
  "webpack": "^4.39.2"
},
"overrides": {
  "@angular-devkit/[email protected]": {
    "worker-plugin": {
      "webpack": "^4.39.2"
     }
  }
}

Comments

-3

You Should check your webpack version in Package-lock.json and package.json

1 Comment

What version should we expect ? Or how can we know which version should be expected ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.