-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
http2 module not found #1474
Comments
I have seen exactly the same thing. My preliminary research looks like it has something to do with create-react-app interfering with the http2 module, though it's a bit beyond my comprehension the reasons for doing this. facebook/create-react-app#5686 seems to reference the problem. |
@AndreiEnache @rux @niftylettuce i guess with 5.0.0 it's required to make alias in webpack config such as: resolve: {
alias: {
superagent: 'node_modules/superagent/lib/client' // or node_modules/superagent/dist/superagent.js
}
} i was hoping that there would something like |
You can't modify the webpack config unless you eject the CRA which I'd rather not do |
@AndreiEnache maybe you could try |
CRA handles linking correctly - I did try it just in case and it's still no go.
Thank you for the reference. It seems this is the right path to take:
|
I managed to get a way with only a warning by surrounding the http2 require in a try-catch in
and by commenting |
Please try v5.0.1 The 'http2' is not supported until Node.js 8.4.0, though it's not stable until v10.10.0. |
As I said in the OP, I'm running this in the browser (it's a react app bootstrapped by create-react-app) |
v5.0.1 is released and it has fixed this issue. This package also works again without throwing this error in Node versions v6.4.0 to v8.x. npm install superagent@latest or with yarn: yarn add superagent@latest let me know if any further issues. you should not need any workarounds. |
Sadly v5.0.1 doesn't fix this issue as it is not related to node. To prove a point, I updated to 5.0.1 and I'm not getting the |
@AndreiEnache please try v5.0.2 (just released!) and get back to me - thank you for reporting. We were missing a line in browser config in See ccc7f56 |
I have also just unpublished v5.0.0 and v5.0.1 from NPM to prevent further headache. |
It's fixed. Thank you! |
After updating from [email protected] to 5.0.0 in create-react-app with typescript I'm running into an error:
Downgrading back to 4.1.0 solves this problem
The text was updated successfully, but these errors were encountered: