angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Cannot find module 'webpack-sources'

Open rodaz opened this issue 9 years ago • 4 comments

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. (E:\PKI\std\modules\web\admin-rc\node_modules\license-webpack-plugin\dist\LicenseWebp ackPlugin.js:14:25) at Module._compile (module.js:573:30) at Object.Module._extensions..js (module.js:584:10) at Module.load (module.js:507:32) at tryModuleLoad (module.js:470:12) at Function.Module._load (module.js:462:3) at Module.require (module.js:517:17) at require (internal/module.js:11:18) at Object. (E:\PKI\std\modules\web\admin-rc\node_modules\license-webpack-plugin\dist\index.js:3: 30) at Module._compile (module.js:573:30) at Object.Module._extensions..js (module.js:584:10) at Module.load (module.js:507:32) at tryModuleLoad (module.js:470:12) at Function.Module._load (module.js:462:3) at Module.require (module.js:517:17) at require (internal/module.js:11:18) at Object. (E:\PKI\std\modules\web\admin-rc\node_modules@angular\cli\models\webpack-configs\pro duction.js:8:34) at Module._compile (module.js:573:30)

rodaz avatar Oct 17 '17 13:10 rodaz

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'".

herzinger avatar Oct 17 '17 17:10 herzinger

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

bamtron5 avatar Oct 17 '17 21:10 bamtron5

im getting this exact same error after trying to update the angular cli locally in a project

joshSummerhays avatar Oct 18 '17 17:10 joshSummerhays

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.