Chartist-js: Uncaught TypeError: Cannot read property 'window' of undefined

Created on 19 Jul 2019  路  11Comments  路  Source: gionkunz/chartist-js

Hi,
I've been getting this issue and because of this, my whole application is not working. Please help me out in this ASAP.
I'm using version 0.11.2
chartist

Most helpful comment

when the next release ?

All 11 comments

Hi @gionkunz,

I use the version 0.11.3 and I have the same error.

I think the reason is for the AMD prefix in the javascript file:

chartist-globalRoot-is-undefined

Usage:

  • Chrome (current version)
  • Angular 8.1
  • chartist 0.11.3

Please help me.

Thank you

@larrybotha, would this be addressed by https://github.com/gionkunz/chartist-js/pull/1177 ?

@gionkunz yup!

Edit: Let me know if I should revert conflicts to before my changes; I imagine you'd want to handle versions etc. on your side before publishing to npm

Edit2: Side note - it may be a good idea not to commit built files in the repo to avoid conflicts, while ensuring they are still published to npm

Is there a solution for this issue?

@larrybotha, yeah, can you exclude the dist files from your PR? I will then build and commit after merging.

@gionkunz done!

when the next release ?

Any updates here? Also facing same issue and don't want to use another chart engine.

Until https://github.com/gionkunz/chartist-js/pull/1177 is published to a new release on npm lock your version of Chartist in package.json to 0.10.1

EDIT: @gionkunz what's missing from the latest release is the latest build for dist that includes the changes from https://github.com/gionkunz/chartist-js/pull/1177

This should be fixed with the v0.11.4 release which is now public on NPM

hi, I have a problem with
main-es2015.6e67fdaf70aac61e8b1c.js:1 Uncaught TypeError: Cannot read property 'window' of undefined
when building project angular 8
please help me?please

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eddr picture eddr  路  3Comments

jbwl picture jbwl  路  4Comments

bluepineventures picture bluepineventures  路  4Comments

Globegitter picture Globegitter  路  4Comments

adilbenmoussa picture adilbenmoussa  路  4Comments