Error in webpack compilation

I have an error when I try to start an angular2 project. This happened after switching from ubuntu pc to macOS X. Node version: 7.7.4, npm version: 4.1.2. I run npm webpack-dev-server --inline --progress --watch --port 8180

and then get this information:

WARNING in ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
69:15-36 Critical dependency: the request of a dependency is an expression

WARNING in ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
85:15-102 Critical dependency: the request of a dependency is an expression

WARNING in ./~/angular2-focus/~/@angular/core/@angular/core.es5.js
5889:15-36 Critical dependency: the request of a dependency is an expression

WARNING in ./~/angular2-focus/~/@angular/core/@angular/core.es5.js
5905:15-102 Critical dependency: the request of a dependency is an expression

ERROR in [default] /Users/user/Documents/Java/WORK/mediahelper/media-helper/src/main/web/node_modules/angular2-focus/node_modules/@angular/core/src/animation/animation_metadata_wrapped.d.ts:12:32 
Initializers are not allowed in ambient contexts.

[...]

ERROR in [default] /Users/user/node_modules/@types/core-js/index.d.ts:651:4 
All declarations of 'prototype' must have identical modifiers.

ERROR in [default] /Users/user/node_modules/@types/core-js/index.d.ts:666:4 
All declarations of 'prototype' must have identical modifiers.

ERROR in [default] /Users/user/node_modules/@types/core-js/index.d.ts:680:4 
All declarations of 'prototype' must have identical modifiers.

ERROR in [default] /Users/user/node_modules/@types/core-js/index.d.ts:692:4 
All declarations of 'value' must have identical modifiers.

ERROR in [default] /Users/user/node_modules/@types/core-js/index.d.ts:804:4 
All declarations of 'prototype' must have identical modifiers.

      

+3


source to share


1 answer


Just updated my animal project to @ angular4 and got similar warnings

angular/core.es5.js 5889:15-36 Critical dependency: 
the request of a dependency is an expression

      

Modify your webpack.conf.js



from: /angular(\|/)core(\|/)(esm(\|/)src|src)(\|/)linker/
to:   /angular(\|/)core(\|/)@angular/

      

Reddit thread link: https://www.reddit.com/r/Angular2/comments/6160c2/angular_400_now_available/dfci3gm/

+1


source







All Articles