Skip to content

Version 6 process is not defined #4564

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
3 of 4 tasks
Janrupf opened this issue Apr 12, 2025 · 1 comment
Open
3 of 4 tasks

Version 6 process is not defined #4564

Janrupf opened this issue Apr 12, 2025 · 1 comment
Labels

Comments

@Janrupf
Copy link

Janrupf commented Apr 12, 2025

Prerequisites

What theme are you using?

other

Version

6

Current Behavior

process is referenced in potential browser code:

if (get(process, 'env.NODE_ENV') !== 'test') {

This leads to a javascript exception process is not defined

Expected Behavior

Properly detect whether process is defined or not. Just referencing it may throw an error in browser environments.

Steps To Reproduce

  1. Include an alpha build in your project
  2. Attempt to use rjsf Form's

Environment

- OS: ArchLinux
- Node: 23
- npm: 11.3.0

Anything else?

My suggestion would be to wrap this in a typeof(process) !== "undefined" check, in which case the variable not being defined doesn't lead to an exception.

@Janrupf Janrupf added bug needs triage Initial label given, to be assigned correct labels and assigned labels Apr 12, 2025
heath-freenome added a commit that referenced this issue Apr 17, 2025
Fixed #4564 to eliminate typing issue
@heath-freenome heath-freenome removed the needs triage Initial label given, to be assigned correct labels and assigned label Apr 17, 2025
@heath-freenome
Copy link
Member

@Janrupf fixing this now

heath-freenome added a commit that referenced this issue Apr 17, 2025
* Fixed #4564 by checking process type
Fixed #4564 to eliminate typing issue

* - Removed the `indexBrowser` implementation since the typechecking handles it much more simply
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants