8000 Error in function getGlobalObject in ./node_modules/voca/index.js:3595 · Issue #57 · panzerdp/voca · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Error in function getGlobalObject in ./node_modules/voca/index.js:3595 #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
stephan-swiftcom opened this issue Mar 17, 2021 · 0 comments

Comments

@stephan-swiftcom
Copy link
stephan-swiftcom commented Mar 17, 2021

Welcome to Voca's GitHub repo!

Expected behavior 😸

Importing the library should not throw an exception.

Actual behavior 😿

Following exception is thrown:

global is not defined

Error in function getGlobalObject in ./node_modules/voca/index.js:3595

 3593 |   if (typeof global === 'object' && global.Object === Object) {
 3594 |     // NodeJS global object
> 3595 |     globalObject$1 = global;

Steps to reproduce 👷

This seems to be an issue using voca in the latest major update of Gatsby (v3), or perhaps Webpack?
From what I can gather, voca is initialising the global object using "global" (ie NodeJS instance) even though this is a browser instance, I don't understand why it would be entering that if statement

Technical details: 🔧

Browser/OS type: Chrome/ Ubuntu 20
Node version: v12.21.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0