Skip to content
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

v2: process is not defined error when bundled with webpack #412

Closed
th0r opened this issue Jun 20, 2019 · 0 comments
Closed

v2: process is not defined error when bundled with webpack #412

th0r opened this issue Jun 20, 2019 · 0 comments

Comments

@th0r
Copy link

th0r commented Jun 20, 2019

The problem:
In our project we use Swagger UI which uses stream-browserify which uses this module, but version 2.

We bundle out app using Webpack and use node: {process: false} config option which prevents webpack to polyfill global process object. We have to do this for a couple of reasons (workaround some bugs in other dependencies).

But in this case this library throws process is not defined error because it assumes that global process object is defined.

Solution:
Add typeof process !== 'undefined' checks in problematic places. Here is the PR: #413

Notes:
This PR fixes v2 and was branched from v2.3.6 tag so it would be great to ship v2.3.7 with this fix.

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

Successfully merging a pull request may close this issue.

2 participants