-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 resolve module 'child_process' to build XMLHttpRequest #66
Comments
It seems I can't use require('xmlhttprequest').XMLHttpRequest for web? |
The xmlhttprequest module shims the There are two solutions to this problem:
module.exports = XMLHttpRequest; Btw: This is not a webpack-dev-server issue. |
according to @jhnns 's answer, adding this to the externals in webpack.config.js fixed Parse for me. externals:[{
xmlhttprequest: '{XMLHttpRequest:XMLHttpRequest}'
}] |
Hi @jhnns I tried to use an alias for the xmlhttprequest module. The way I did is I created a dummy a.js file and I put module.exports = XMLHttpRequest; in it. In my make-webpack-config.js I have Thanks! |
this worked for me
|
Related to importing/parsing XMLHttpRequest See: webpack/webpack-dev-server#66
ERROR in ./~/parse/~/xmlhttprequest/lib/XMLHttpRequest.js Module not found: Error: Cannot resolve module 'child_process' in /Users/aksonov/UPDT/sf/node_modules/parse/node_modules/xmlhttprequest/lib @ ./~/parse/~/xmlhttprequest/lib/XMLHttpRequest.js 15:12-36
The text was updated successfully, but these errors were encountered: