Code Monkey home page Code Monkey logo

Comments (4)

inorganik avatar inorganik commented on September 13, 2024

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:

  1. upgrade node and in turn npm. Note that this can potentially cause issues in other node projects that are counting on a certain version of node. You can use nvm and an .nvmrc file to fix that
  2. blow away your node_modules: rm -rf node_modules
  3. reinstall: npm i.

You could try yarn too:

  1. brew install yarn
  2. yarn - installs

Try that and let me know how it goes so we can resolve this issue.

from ngx-countup.

Tarang avatar Tarang commented on September 13, 2024

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)

from ngx-countup.

inorganik avatar inorganik commented on September 13, 2024

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!

from ngx-countup.

inorganik avatar inorganik commented on September 13, 2024

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.

from ngx-countup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.