Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng build --prod 下出现的问题 #2

Closed
daonatural opened this issue May 27, 2017 · 2 comments
Closed

ng build --prod 下出现的问题 #2

daonatural opened this issue May 27, 2017 · 2 comments

Comments

@daonatural
Copy link

我用的是angular-cli开发项目,用了ngx-echarts后,没有问题,页面也可以正常显示,当我重新ng serve的时候,会出现异常
ERROR in Error encountered resolving symbol values statically. Calling function 'ɵmakeDecorator', function calls are not supported. Co nsider replacing the function or lambda with a reference to an exported function, resolving symbol NgModule in /node_modules/_ngx-echarts@1.2.0@ngx-echarts/node_modules/@angular/core/core.d.ts, resolving symbol Angular EchartsModule in /node_modules/_ngx-echarts@1.2.0@ngx-echarts/index.d.ts, resolving symbol AngularEchartsModule in /node_modules/_ngx-echarts@1.2.0@ngx-echarts/index.d. ts
再次complie又成功了,所以就没放在心上。

但当我用ng build --prod 打包项目的时候就会抛出同样的错误:
ERROR in Error encountered resolving symbol values statically. Calling function 'ɵmakeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol Injectable in E:master/project/node_modules/ngx-echarts/node_modules/@angular/core/core.d.ts, resolving symbol ɵf in E:/master/project/node_modules/ngx-echarts/node_modules/@angular/core/core.d.ts, resolving symbol ɵf in E:/master/project/node_modules/ngx-echarts/node_modules/@angular/core/core.d.ts

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'E:\master\project\s
rc'
@ ./src/main.ts 5:0-74
@ multi ./src/main.ts`

@xieziyu
Copy link
Owner

xieziyu commented May 28, 2017

@freeWd 我自己的多个项目中也都是使用了ngx-echarts,并且使用ng build --prod是成功的。所以没有能够复现出你的问题。我怀疑和你本地的开发环境有关系,请试一下清空node_modules目录,然后重新npm install一次?

@daonatural
Copy link
Author

谢谢你的回复,这两天没有上网,回家过节了。所以没能及时回复你,表示歉意。
这个问题昨天才解决,是因为angular-cli的版本问题导致的,升级就没报这个错了。 ♪(^∇^*)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants