-
Notifications
You must be signed in to change notification settings - Fork 12k
Cannot find module 'webpack/lib/node/NodeTemplatePlugin' using cli 1.1.1 #6641
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
Comments
Had the same problem, but it turned out that I just forgot to delete the new package-lock file introduced with npm 5. Just deleted this and the node_modules and everything worked as expected after npm install. |
@Markus-Ende solution worked for me. Thx! |
this worked for me as well. might be nice to see a note in the 'upgrading section'. |
@Markus-Ende That did the trick, thank you! |
Could someone explain why we need to delete the lock file? |
I've deleted my lock file and I still get the error. Every time you do an npm install it's going to add the lock file back. |
I have this same issue with angular-cli@1.2.0, but only on our test server, not locally. I'm not a fan of removing the package-lock file. |
Had the same problem - installing |
Thanks, this solved the issue!!!! |
@treeder the package-lock prevented a new webpack version to be installed (it's like the former npm-shrinkwrap). The version defined in the package-lock file beats the version defined in package.json, so For further documentation about the package-lock see the npm lockfiles documentation on docs.npmjs.com |
worked for me. Thx for the hint 👍 |
@Markus-Ende thank you. You saved my life... I almost went nuts |
npm i webpack --save-dev |
If somebody will have next issue - "Cannot read property 'thisCompilation' of undefined" after
|
after removing the |
Angular Live Development Server is listening on localhost:4300, open your browser on http://localhost:4300/ ** Error: Callback was already called. |
|
The error you're all facing is only because webpack version, the latest update v4 has a lot of issue, the solution you need is just reinstall webpack again with 3.12.0 and it will work. This version cause a lot of error, and this is the solution I solve the error with. and it works now perfect. I hope that help |
I got the same issue and I tried webpack@3.12.0 but still got that error. But I got this warning when install older version. npm i webpack@3.12.0 --save-dev |
got same, update to 7.2 helps to me |
For people with different angular/cli:
My |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
OS?
@angular/cli: 1.1.1
node: 8.0.0
os: win32 x64 (Windows 10)
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/core: 4.1.3
@angular/forms: 4.1.3
@angular/http: 4.1.3
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/router: 4.1.3
@angular/cli: 1.1.1
@angular/compiler-cli: 4.1.3
Repro steps:
Failure message:
Cannot find module 'webpack/lib/node/NodeTemplatePlugin'
Error: Cannot find module 'webpack/lib/node/NodeTemplatePlugin'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object. (C:\ng413\demo\node_modules\html-webpack-plugin\lib\compiler.js:11:26)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object. (C:\ng413\demo\node_modules\html-webpack-plugin\index.js:7:21)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
The text was updated successfully, but these errors were encountered: