-
Notifications
You must be signed in to change notification settings - Fork 69
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
Can't resolve 'http' error when using on React app #534
Comments
/kind bug |
As a workaround, I've created a rudimentary implementation of CE, see: cardil/openshift-knative-showcase@eb89f73#diff-58fee3b5a7bfb1b5ea233e33d76eda15c8c7e034f76d62770b763526c4475328 |
Did you try this solution? |
Unfortunately that can't be done in standard Create-react-app. I would need to eject the CRA to have full access to the configuration files. |
This issue is stale because it has been open 30 days with no activity. |
This issue also exists for any other stack that encapsulates webpack, I see the same issue with Angular. Would it be possible to have the transports more isolated from the actual events? It works fine if I stick to interface, once I try to use the class it fails. |
I was almost able to solve it by applying a workaround: And adding paths to
Kudos goes to https://stackoverflow.com/questions/67572355/webpack-5-angular-polyfill-for-node-js-crypto-js Unfortunately, you still need process as Webpack plugin, see: So the build works now, but the application fails in browser :-(. |
With this polyfill code it works, but it feels bad man :-)
|
This issue is stale because it has been open 30 days with no activity. |
Is there any update? |
This issue is stale because it has been open 30 days with no activity. |
Describe the Bug
I'm trying to use CE javascript SDK in a React app. I have the following err:
That error is thrown just after trying to create the CE:
I just wanted to parse incoming Server Sent Events data that is in structured-mode CE.
Steps to Reproduce
npx create-react-app frontend --template typescript
npm i --save cloudevents
You can also see this error on this commit: cardil/openshift-knative-showcase@cc8ffe2
Expected Behavior
I just want to create basic CE objects, in React app. And parse them from the JSON text, in the near future. No errors should be thrown.
The text was updated successfully, but these errors were encountered: