In a process of migration from webpack2 to webpack4 and from Angular4 to Angular5 I'm getting strange error for webpack compilation (./node_modules/.bin/webpack-cli):
ERROR in Could not resolve module @angular/core
Debugging webpack (node --inspect-brk ./node_modules/.bin/webpack-cli
) got an error stack trace:
Error: Could not resolve module @angular/core
at StaticSymbolResolver.getSymbolByModule (.../node_modules/@angular/compiler/bundles/compiler.umd.js:29766:30)
at StaticReflector.findDeclaration (.../node_modules/@angular/compiler/bundles/compiler.umd.js:31635:63)
at StaticReflector.initializeConversionMap (.../node_modules/@angular/compiler/bundles/compiler.umd.js:31953:36)
at new StaticReflector (.../node_modules/@angular/compiler/bundles/compiler.umd.js:31571:14)
at Object.createAotCompiler (.../node_modules/@angular/compiler/bundles/compiler.umd.js:32957:44)
at AngularCompilerProgram._createCompiler (.../node_modules/@angular/compiler-cli/src/transformers/program.js:404:37)
at AngularCompilerProgram.get [as hostAdapter] (.../node_modules/@angular/compiler-cli/src/transformers/program.js:327:22)
at AngularCompilerProgram._createProgramWithBasicStubs (.../node_modules/@angular/compiler-cli/src/transformers/program.js:435:73)
at .../node_modules/@angular/compiler-cli/src/transformers/program.js:143:28
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
at Function.Module.runMain (module.js:684:11)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:613:3
But unfortunately it still does not give a hint.
Here is package.json dependancies.
Reported this issue on angular repo.