出口“ɵcmf”在“@角/核心”未找到
问题描述:
当开始的WebPack-DEV-服务器以下警告抛出:出口“ɵcmf”在“@角/核心”未找到
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'
因为它仅仅是一个警告的输出仍然是产生和提供服务,试图访问该应用程序
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
当被抛出和角度不能成功引导。
答
如果您运行“ng -v”,您是否拥有相同版本中的所有angular依赖关系?
我有完全相同的问题,当我执行该命令的结果是:
@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
我改变了的package.json,并设置所有与4.2.3版本的依赖关系,然后跑“RM -rf node_modules & & npm install“现在正在运行!
希望它解决您的问题!
+0
其实这个错误在我今天刚刚停止出现(可能在我和你做过类似的事情之后描述)。这似乎是一个合理的解释。 – Aides
答
今天早上我有同样的问题,对昨天工作的代码没有任何改变。
我刚刚重新安装了我的node_modules,它为我修复了它。
rm -rf node_modules && npm install
你可以发布webpack配置文件? – CharanRoot
https://gist.github.com/Aides359/16d2f5466521f69bdef5f53aeebc4057它基本上是基本的'ng eject'配置(稍做修改) – Aides