Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

export 'ɵcmf' was not found in '@angular/core'

When starting webpack-dev-server following warning is thrown:

WARNING in ./~/@angular/compiler/@angular/compiler.es5.js
11051:13-17 "export 'ɵcmf' was not found in '@angular/core'

WARNING in ./~/@angular/compiler/@angular/compiler.es5.js
11056:13-17 "export 'ɵmod' was not found in '@angular/core'

WARNING in ./~/@angular/compiler/@angular/compiler.es5.js
11061:13-17 "export 'ɵmpd' was not found in '@angular/core'

Since it is only a warning the output is still generated and served, when trying to access the app

Uncaught TypeError: jit_val0 is not a function
    at eval (module.ngfactory.js? [sm]:1)
    at evalExpression (compiler.es5.js:26423)
    at jitStatements (compiler.es5.js:26435)
    at JitCompiler._compileModule (compiler.es5.js:26716)
    at compiler.es5.js:26655
    at Object.then (compiler.es5.js:1679)
    at JitCompiler._compileModuleAndComponents (compiler.es5.js:26653)
    at JitCompiler.compileModuleAsync (compiler.es5.js:26582)
    at PlatformRef_._bootstrapModuleWithZone (core.es5.js:4811)
    at PlatformRef_.bootstrapModule (core.es5.js:4797)
(anonymous) @ module.ngfactory.js? [sm]:1
evalExpression @ compiler.es5.js:26423
jitStatements @ compiler.es5.js:26435
JitCompiler._compileModule @ compiler.es5.js:26716
(anonymous) @ compiler.es5.js:26655
then @ compiler.es5.js:1679
JitCompiler._compileModuleAndComponents @ compiler.es5.js:26653
JitCompiler.compileModuleAsync @ compiler.es5.js:26582
PlatformRef_._bootstrapModuleWithZone @ core.es5.js:4811
PlatformRef_.bootstrapModule @ core.es5.js:4797
(anonymous) @ main.ts:12
__webpack_require__ @ bootstrap 91fab75…:54
(anonymous) @ main.bundle.js:20785
__webpack_require__ @ bootstrap 91fab75…:54
webpackJsonpCallback @ bootstrap 91fab75…:25
(anonymous) @ main.bundle.js:1

is thrown and Angular does not bootstrap successfully.

like image 295
Aides Avatar asked Dec 19 '22 06:12

Aides


1 Answers

If you ran "ng -v" do you have all the dependencies of angular in the same version?

I was having the exact same problem and when I execute that command the result was:

@angular/cli: 1.0.1
node: 6.11.0
os: linux x64
@angular/animations: 4.2.3
@angular/common: 4.2.3
@angular/compiler: 4.2.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/platform-server: 4.1.3
@angular/router: 4.1.3
@angular/cli: 1.0.1
@angular/compiler-cli: 4.1.0

I changed the package.json and set all the dependencies with the 4.2.3 version, then ran "rm -rf node_modules && npm install" and now is working!

like image 70
Juan Carlos Casalderrey Avatar answered Jan 02 '23 15:01

Juan Carlos Casalderrey