Closed vbolshutkin closed 7 years ago
The only thing I can think of is the angular upgrade causing it?
Try downgrading to angular2.1 to see if it solves? Not a solution but I am AFK this weekend and it gets you somewhere.
On Sat, 11 Mar 2017 at 03:33, Vladimir Bolshutkin notifications@github.com wrote:
In clean working copy cloned from master branch with re-installed npm dependencies running ionic build browser --prod fails with the following error:
[19:01:01] ngc started ... [19:01:02] build prod failed: Error encountered resolving symbol values statically. Calling function 'NoOpAnimationDriver', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AnimationDriver.NOOP in /home/user/devel/clicker/node_modules/@angular/platform-browser/src/dom/animation_driver.d.ts, resolving symbol BrowserTestingModule in /home/user/devel/clicker/node_modules/@angular/platform-browser/testing/browser.d.ts, resolving symbol BrowserTestingModule in /home/user/devel/clicker/node_modules/@angular/platform-browser/testing/browser.d.ts [19:01:02] ionic-app-script task: "build" [19:01:02] Error: Error encountered resolving symbol values statically. Calling function 'NoOpAnimationDriver', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AnimationDriver.NOOP in /home/user/devel/clicker/node_modules/@angular/platform-browser/src/dom/animation_driver.d.ts, resolving symbol BrowserTestingModule in /home/user/devel/clicker/node_modules/@angular/platform-browser/testing/browser.d.ts, resolving symbol BrowserTestingModule in /home/user/devel/clicker/node_modules/@angular/platform-browser/testing/browser.d.ts Error: Error encountered resolving symbol values statically. Calling function 'NoOpAnimationDriver', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AnimationDriver.NOOP in /home/user/devel/clicker/node_modules/@angular/platform-browser/src/dom/animation_driver.d.ts, resolving symbol BrowserTestingModule in /home/user/devel/clicker/node_modules/@angular/platform-browser/testing/browser.d.ts, resolving symbol BrowserTestingModule in /home/user/devel/clicker/node_modules/@angular/platform-browser/testing/browser.d.ts at simplifyInContext (/home/user/devel/clicker/node_modules/@angular/compiler/bundles/compiler.umd.js:25703:25) at StaticReflector.simplify (/home/user/devel/clicker/node_modules/@angular/compiler/bundles/compiler.umd.js:25715:15) at StaticReflector.annotations (/home/user/devel/clicker/node_modules/@angular/compiler/bundles/compiler.umd.js:25213:62) at NgModuleResolver.resolve (/home/user/devel/clicker/node_modules/@angular/compiler/bundles/compiler.umd.js:17573:84) at CompileMetadataResolver.getNgModuleMetadata (/home/user/devel/clicker/node_modules/@angular/compiler/bundles/compiler.umd.js:18081:62) at CompileMetadataResolver.getNgModuleSummary (/home/user/devel/clicker/node_modules/@angular/compiler/bundles/compiler.umd.js:18037:54) at /home/user/devel/clicker/node_modules/@angular/compiler/bundles/compiler.umd.js:18127:70 at Array.forEach (native) at CompileMetadataResolver.getNgModuleMetadata (/home/user/devel/clicker/node_modules/@angular/compiler/bundles/compiler.umd.js:18122:51) at addNgModule (/home/user/devel/clicker/node_modules/@angular/compiler/bundles/compiler.umd.js:24975:60)
Before upgrading to ionic 2.1.0 (commit 13a6cd6 https://github.com/lathonez/clicker/commit/13a6cd6ac94de0897b0e0d3dca65261f9c7ac3a8) it worked well.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lathonez/clicker/issues/236, or mute the thread https://github.com/notifications/unsubscribe-auth/AG5tSBGY27YP9qnIsp-kHmk7RZ66xepUks5rkYJXgaJpZM4MZoDz .
replicated
confirmed that downgrading to angular 2.2.1 fixes (this specific problem) - not a solution
fair few hits in angular/cli:
Suggestion seems to be excluding test.ts from build
Straight upgrade of Ionic to angular2.4 on a starter project does not give the error, suggesting something from the testing framework must be the root cause (as suggested above)
I fixed this in my project by adding the following to: tsconfig.json
:
"exclude": [
"src/test.ts",
"node_modules",
"**/*.spec.ts"
],
See also: https://github.com/driftyco/ionic-app-scripts/issues/806
@saschwarz thanks - confirmed working here, needed both test.ts and *.spec.ts. There was a reason we didn't do this..
Reason: https://github.com/lathonez/clicker/issues/174#issuecomment-261438411
Excluding spec makes the testing imports go missing in the editor. I do hate the fact that when I change code (and my tests break), ionic serve stops working though.
Maybe exlcuding spec from the main tsconfig.json is the lesser of two evils?
Also presumably there's a way of configuring one's editor outside of the project's tsconfig.json
above should sort it, added some tests for the browser build into CI as a quick win.
TODO - update blog if this is legit
This issue came up again after upgrading to Ionic 3. The cause is a d.ts
file related to @ionic/cloud-angular
which I had installed previously to test out their service. After removing it, rolling back all the steps here: https://docs.ionic.io/setup.html, I was able to build again. I don't know why excluding node_modules
in ts.config.json
doesn't work. But that was where the file was.
Not happening here or on travis:
https://s3.amazonaws.com/archive.travis-ci.org/jobs/220910203/log.txt
I've never used cloud-angular so I guess isolated to that.
In clean working copy cloned from master branch with re-installed npm dependencies running
ionic build browser --prod
fails with the following error:Before upgrading to ionic 2.1.0 (commit 13a6cd6ac94de0897b0e0d3dca65261f9c7ac3a8) it worked well.