-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
process undefined in react native environment #86
Comments
|
(A workaround is to declare a |
Already tried it without success. |
I'm empathatic to this breaking, to be clear. readable-stream v2 was never in v4 of this package, v3 was added in v4.1.0. https://stackoverflow.com/a/42439338/632724 suggests that metro does handle this properly, altho that was back in 2017. The next answer, https://stackoverflow.com/questions/42437995/react-native-process-env-has-only-node-env, suggests using babel - which could transform |
Yes it is what I meant. It works for me in v4.2.1 of this package. I see in your latest commit you downgrade readable-stream to v2 add added hash-base. Commit 9e2bf12
I will try one of these solutions. Thanks. |
We are having the same issue in an Emberjs environment Traced it back to the latest patch of this repo Found the exact line that is throwing the error in We managed to fix it by adding |
Without exception, your bundler is broken if this doesn't work by default, but I'm glad to hear that ember has a simple config to fix it. |
@akshayOodlesTech does your webpack config apply that plugin to node_modules code? if so, then i'd file an issue with webpack. |
My comment on commit relates to this issue. |
I’m getting this issue with Vite. For now I’ve worked around it by adding this entry to the export default defineConfig(env => ({
define: {
...(process.env.VITEST ? {} : { 'process.version': JSON.stringify(process.version) }),
},
})); |
To be clear, that’s not a workaround, that’s the proper fix for vite. |
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as off-topic.
This comment was marked as off-topic.
Since using newer versions of readable-stream would be a breaking change, and the usage of Solutions include 1) using a non-broken bundler, 2) configuring your broken bundler to ensure |
Hi, crypto-browserify uses this package and many react-native crypto apps use crypto-browserify.
Seems that the latest readable-stream downgrade in your package.json broken all this apps because process is not available.
In my case react native quick crypto.
Check this
margelo/react-native-quick-crypto#242 (comment)
Any workaround?
The text was updated successfully, but these errors were encountered: