global is not defined
See original GitHub issueBug report
ReferenceError: global is not defined
Version
0.14.0
Steps to reproduce
so i install the modules - file-saver
,but when i import it in my project, the chrome throw the error:
global is not defined
i import it like this:
import FileSaver from 'file-saver'
What is expected?
i hope i can use the file-saver normaly;
What is actually happening?
it doesn’t work
Other relevant information
- Your OS: mac
- Node.js version: 10.0
- Browser version:
- Is this a global or local install? yarn add file-saver
- Which package manager did you use for the install? yarn
- Does this issue occur when all plugins are disabled? no
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Uncaught ReferenceError: global is not defined #2141 - GitHub
ncaught ReferenceError : global is not defined at Object../node_modules/buffer/index.js (index.js:43) at webpack_require (bootstrap:76)
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? // vite....
Read more >Angular 7: Uncaught ReferenceError: global is not defined ...
When I googled it everyone says to add this (window as any).global = window; to pollyfills.ts I have done this and I still...
Read more >Node.js – Angular 7: Uncaught ReferenceError: global is not ...
Node.js – Angular 7: Uncaught ReferenceError: global is not defined when adding package ... When I googled it everyone says to add this...
Read more >react global is not defined | The AI Search Engine You Control
Installing and importing react-dates results in this error: Uncaught ReferenceError: global is not defined since react-dates has some dependencies that use ...
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’m having the same problem and really don’t understand what’s going on.
I managed to build a workaround for it by using
window.global = window
inenhanceApp.js
. However, since this has to run before the imports, I have to userequire
instead ofimport
:How did you solve this? I’m having a same issue…