-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Cannot use libraries that require 'child_process' #3032
Comments
ghost
changed the title
Cannot use libraries that
Cannot use libraries that require 'child_process'
Aug 30, 2017
I wouldn't mind that. PR? |
Thanks for the quick response, coming right up. |
Done, #3033 |
https://www.npmjs.com/package/thrift package is only supports NodeJS, while you're trying to use it in browser environment. |
This should be resolved as of 1.0.13. Please verify, thanks! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is this a bug report?
No
Can you also reproduce the problem with npm 4.x?
Yes
Environment
node -v
: v8.4.0npm -v
: 5.3.0yarn --version
(if you use Yarn): 0.27.5npm ls react-scripts
(if you haven’t ejected): [email protected]Operating system: OSX
Browser and version (if relevant): N/A
Steps to Reproduce
Expected Behavior
The dev server will work as expected.
Actual Behavior
The dev server complains about:
Module not found: Error: Cannot resolve module 'child_process'
Details
I am including the thrift library just for serializing/deserializing objects client side, and due to somewhere in the library where it requires 'child_process', it fails to load the dev server.
If I go to:
/node_modules/react-scripts/config/webpack.config.*.js
and append child_process: 'empty' to
Then I can successfully load the server. Would it be an unreasonable pull request to add this? Thrift does use this when making connections, but since connections aren't being done in this use case, I figured stubbing child_process like fs makes the most sense.
I can do this manually, but everytime there's an update or a new clone, it's back to it's broken state.
Thanks,
Anthony
The text was updated successfully, but these errors were encountered: