Angular 8 - global is not defined
See original GitHub issueI recently migrated an Angular 7 application (that was using chartist) to Angular 8. After migration the app no longer works with the following error in console:
Uncaught ReferenceError: global is not defined
at chartist.js:1173
chartist version 0.11.4
It seems that Angular CLI removed shim for global
https://github.com/angular/angular-cli/issues/8160#issuecomment-386153833
reasoning here:
https://github.com/angular/angular-cli/issues/9827#issuecomment-369578814
and library authors should not rely on it any more.
workaround mentioned in first linked issue works, but its still just a workaround that is mentioned nowhere in chartist documentation (and ideally should not be required)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Angular 8 to Angular 9, report 'global is not defined' error in ...
Description. I upgraded my angular 8 project to angular 9 using angular cli script: ng update @angular/cli @angular/core.
Read more >Upgrading to angular-6.x gives "Uncaught ReferenceError
Then you're getting the following error Fix: "Uncaught ReferenceError: global is not defined" do it as follows node: { global: true, ...
Read more >How to fix the ReferenceError: global is not defined error in ...
That sound simple enough to fix, just create a vite. config. [js/ts] file, add it to your SvelteKit project and define global right?...
Read more >Uncaught ReferenceError: global is not defined - YouTube
Uncaught ReferenceError: global is not defined at node_modules/@walletconnect/socket-transport/dist/esm/index.jscreate a n ew filw named ...
Read more >Uncaught ReferenceError: Angular is not defined
js file in your index.html file. Angular not defined pretty much means that the library is not loaded properly from the server. We...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found this walk around:
This has just affected a project I’m working on - I’ve had to lock myself to Chartist 0.11.0 until it’s fixed.