-
-
Notifications
You must be signed in to change notification settings - Fork 27.1k
fix process is not defined #12121
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
base: main
Are you sure you want to change the base?
fix process is not defined #12121
Conversation
Hi @rannn505! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
would love to see this merged if it's a good change! I'm encountering this issue on several projects. Thanks! |
That fixed my problem, after two days of searching, I'll wait for the merge, thanks |
Any update on this. Please look into getting this PR out to us as it is much needed |
I'm working through the webpack 5 polyfill issues for a project being upgraded to CRA5. I'm still testing this fix, but @rannn505's solution seems to have worked for me using // craco.config.js
const webpack = require('webpack');
module.exports = {
webpack: {
configure: {
resolve: {
fallback: {
crypto: require.resolve("crypto-browserify"),
stream: require.resolve("stream-browserify"),
},
},
},
plugins: {
add: [
new webpack.DefinePlugin({
process: {},
}),
],
},
},
}; Notes:
If anyone sees a problem with this temp fix, please let me know so I can review. |
Since Webpack 5 no longer shims node builtins, the
process
global is not defined, causing the "Adding Custom Environment Variables" functionality to be broken.This PR proposes a minimal fix that doesn't involve any external packages like "process".
I verified the fix by locally modifying

packages/react-scripts/config/env.js
file.