Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An unhandled exception occurred: Cannot find module '@angular-devkit/build-webpack' 12.1.1 #21250

Closed
kolkov opened this issue Jun 30, 2021 · 5 comments

Comments

@kolkov
Copy link

kolkov commented Jun 30, 2021

Build error after update to 12.1.1

image

image

An unhandled exception occurred: Cannot find module '@angular-devkit/build-webpack'
Require stack:
- D:\Go\freicon\web\node_modules\@angular-devkit\build-angular\src\dev-server\index.js
- D:\Go\freicon\web\node_modules\@angular-devkit\architect\node\node-modules-architect-host.js
- D:\Go\freicon\web\node_modules\@angular-devkit\architect\node\index.js
- D:\Go\freicon\web\node_modules\@angular\cli\models\architect-command.js
- D:\Go\freicon\web\node_modules\@angular\cli\commands\serve-impl.js
- D:\Go\freicon\web\node_modules\@angular-devkit\schematics\tools\export-ref.js
- D:\Go\freicon\web\node_modules\@angular-devkit\schematics\tools\index.js
- D:\Go\freicon\web\node_modules\@angular\cli\utilities\json-schema.js
- D:\Go\freicon\web\node_modules\@angular\cli\models\command-runner.js
- D:\Go\freicon\web\node_modules\@angular\cli\lib\cli\index.js
- D:\Go\freicon\web\node_modules\@angular\cli\lib\init.js
- D:\Go\freicon\web\node_modules\@angular\cli\bin\ng
See "C:\Users\Andy\AppData\Local\Temp\ng-tCGKQ6\angular-errors.log" for further details.

Process finished with exit code 127

Angular CLI: 12.1.0
Node: 16.4.0 (Unsupported)
Package Manager: npm 7.19.0
OS: win32 x64

Angular: 12.1.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1201.0
@angular-devkit/build-angular   12.1.0
@angular-devkit/core            12.1.0
@angular-devkit/schematics      12.1.0
@angular/cdk                    12.1.0
@angular/cli                    12.1.0
@angular/pwa                    0.803.29
@schematics/angular             12.1.0
rxjs                            6.6.7
typescript                      4.2.4

Warning: The current version of Node (16.4.0) is not supported by Angular.
PS D:\Go\freicon\web>

image

@JoostK JoostK transferred this issue from angular/angular Jun 30, 2021
@JoostK
Copy link
Member

JoostK commented Jun 30, 2021

Have you tried wiping node_modules and clearing the NPM/Yarn lock file?

@JoostK
Copy link
Member

JoostK commented Jun 30, 2021

Additionally, it may be helpful to post the output from npm ls @angular-devkit/build-angular and npm ls @angular-devkit/build-webpack.

@kolkov
Copy link
Author

kolkov commented Jul 1, 2021

Hi! Delete node_modules and package.lock fixed it for me. Thanks, but very strange. :(

@alan-agius4
Copy link
Collaborator

Hi! Delete node_modules and package.lock fixed it for me. Thanks, but very strange. :(

That the turning on/off a computer in Node.JS. Sometimes NPM will not hoist packages correctly when the node_modules or package.lock already exists.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants