question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught (in promise) ReferenceError: process is not defined

See original GitHub issue

Hi there!

When I go to call the Client constructor, I’m getting this error: Uncaught (in promise) ReferenceError: process is not defined

I was navigating to find the proper way to fix it but I didn’t managed it. Did somebody faced something like this?

Here some info of my system: Ubuntu 22.04 packages: “browserify-zlib”: “^0.2.0”, “buffer”: “^6.0.3”, “crypto-browserify”: “^3.12.0”, “http”: “false”, “minio”: “^7.0.28”, “path-browserify”: “^1.0.1”, “react”: “^18.2.0”, “react-app-rewired”: “^2.2.1”, “react-dom”: “^18.2.0”, “react-icons”: “^4.4.0”, “react-router-dom”: “^6.3.0”, “react-scripts”: “^5.0.1”, “stream-browserify”: “^3.0.0”, “stream-http”: “^3.2.0”, “styled-components”: “^5.3.5”, “timers”: “^0.1.1”, “url”: “^0.11.0”, “web-vitals”: “^2.1.4”

Using react-app-rewired to fix some import error caused by minio: module.exports = function override (config, env) { console.log(‘override’) let loaders = config.resolve loaders.fallback = { “fs”: false, “tls”: false, “net”: false, “http”: require.resolve(“stream-http”), “https”: false, “zlib”: require.resolve(“browserify-zlib”) , “path”: require.resolve(“path-browserify”), “stream”: require.resolve(“stream-browserify”), //“util”: false, “crypto”: require.resolve(“crypto-browserify”), }

return config

}

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
prakashsvmxcommented, Jul 6, 2022

yeah. webpack 5 does not include node polyfills by default anymore. We will investigate this

0reactions
draentropiacommented, Jul 6, 2022

Found. It doesn’t work with react-scripts version 5. To replicate it, you can increase “react”, “react-dom” and “react-scripts” to the latest versions (18.2.0 for the two firsts and 5.0.3 for the last)

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Uncaught ReferenceError: process is not defined
Node.js code must be run by the node process, not the browser (the code must run in the server). To run the code,...
Read more >
ReferenceError: “process is not defined” - GIMTEC
In this case, process is not defined in the browser environment, hence the error. The solution is to remove the reference to process...
Read more >
React ReferenceError: process is not defined | bobbyhadz
To solve the "Uncaught ReferenceError: process is not defined" in React, open your terminal in your project's root directory and update the version...
Read more >
"Uncaught ReferenceError: process is not defined" and the ...
The Uncaught ReferenceError: process is not defined happens when when a non-existent (here: process) variable is referenced .
Read more >
process is not defined (NOT react-error-overlay ... - GitHub
Using the optional chaining operator with process ( process?.env ) throws a ReferenceError stating that process is not defined. I originally ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found