Cannot find module 'webpack-sources'
Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Versions.
@angular/cli: 1.4.7 node: 8.3.0 os: win32 x64 @angular/animations: 4.3.6 @angular/cdk: 2.0.0-beta.10 @angular/common: 4.3.6 @angular/compiler: 4.3.6 @angular/core: 4.3.6 @angular/forms: 4.3.6 @angular/http: 4.3.6 @angular/material: 2.0.0-beta.10 @angular/platform-browser: 4.3.6 @angular/platform-browser-dynamic: 4.3.6 @angular/router: 4.3.6 @angular/cli: 1.4.7 @angular/compiler-cli: 4.3.6 typescript: 2.2.2
Repro steps.
ng --prod --aot
The log given by the failure.
Cannot find module 'webpack-sources'
Error: Cannot find module 'webpack-sources'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at Object.
I don't get this exact error, but I do get:
warning "[email protected]" has unmet peer dependency "webpack-sources@>= 1.0.0". error An unexpected error occurred: "EINVAL: invalid argument, lstat '[project path]/node_modules/@angular-devkit/build-optimizer/webpack-loader'".
after install with ng new foo i get
Cannot find module 'webpack-sources'
running
ng serve
nvm => node 6.11.1 npm 5.4.2
@angular/cli: 1.4.7
node: 6.11.1
os: darwin x64
@angular/animations: 4.4.5
@angular/common: 4.4.5
@angular/compiler: 4.4.5
@angular/core: 4.4.5
@angular/forms: 4.4.5
@angular/http: 4.4.5
@angular/platform-browser: 4.4.5
@angular/platform-browser-dynamic: 4.4.5
@angular/router: 4.4.5
@angular/cli: 1.4.7
@angular/compiler-cli: 4.4.5
@angular/language-service: 4.4.5
typescript: 2.3.4
im getting this exact same error after trying to update the angular cli locally in a project
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.