Closed Tarang closed 6 years ago
I can see in your error that the error originates from the node_modules folder of countup.js-angular2
. That shouldn't be there. One other issue was because of that. I believe it's because you have an older version of npm, which recursively installs node_modules, instead of keeping them all in the root node_modules folder and npm now does.
On my end I cannot repro that. I am on: node: 10.4.1 npm: 6.1.0
Here's a fix:
rm -rf node_modules
npm i
.You could try yarn too:
brew install yarn
yarn
- installsTry that and let me know how it goes so we can resolve this issue.
I updated to the latest versions (I was on node 0.8.11.1 & npm 5.6 so it wasnt that much of an update.
The updated versions:
> node --version
v8.11.3
> npm --version
6.1.0
The same thing happened as before:
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 NgModule in
/Users/user/Desktop/app/node_modules/countup.js-angular2/node_modules/@angular/core/core.d.ts,
resolving symbol CountUpModule in
/Users/user/Desktop/app/node_modules/countup.js-angular2/countup.js-angular2.d.ts, resolving symbol
CountUpModule in /Users/user/Desktop/app/node_modules/countup.js-angular2/countup.js-angular2.d.ts
I also tried with Yarn to no avail. I still find it works with 1.1.1 though (npm and yarn).
Looking at the other issue posts it seems a common issue, but the recurring pattern is the use with Ionic (which uses Angular 5.0 if its relevant)
I'm using ng-packagr to distribute this and I've had some trouble with it; there is no prescribed workflow so how to handle dependencies is a little hazy to me.
I still can't repro but what you can do is just copy the directive .ts file from src/app/countup/countup.directive.ts and declare it in a module. Then you just need to npm i countup.js --save
to get the countUp dep.
Wish I knew why angular doesn't just let you distribute typescript files, it would drastically simplify things!
Hi, I think this is resolved, I just pushed 6.0.2 which only has angular as a peer dependency. Please try it and if you still have trouble we can reopen.
Version info
Version 6.0.1
Description
For some reason while building I get this error. I'm not sure what it means. It only happens when the
--prod
flag is passed on for AoT compilation.I checked with the last build before the Angular 6 builds, and that one, version 1.1.1 works fine.
I believe ionic-angular 3.9.2 uses Angular 5.0 (just looking at the other threads). The usage is exactly as specified in the readme