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
TypeError: EventSource is not a constructor #131
Comments
Could you debug this issue? Could you look what you have in the EventSource variable? |
Actually even if i do not import eventsource it should work for crome. but it shows "[ts] Cannot find name 'EventSource'". but if i write it in script tag then it works but script tag is not allowed in .tsx. so any idea how to use eventsource or script tag in .tsx file ? |
I have no ideas, sorry |
[ ERROR ] Rollup: Missing Export: src/dxp-notification.js:4:9 |
No, what is the best way to export the NativeEventSource? |
can you provide eventsource.ts typeScript of same eventsource.js file ? |
could you create a pulll request with that file? |
Similar issue below? TypeError: ActiveXObject is not a constructor |
@franzcortez1127 , are you trying to use it in node.js? It was never working this way, only in browsers, which provide "fetch API". Not sure if it is hard to add node.js support. |
I have tried it with Nest.js. Looks like the same issue. Possible some updates or plans with fixing it? |
@alexfilitaryn-awtg , please propose a fix, I have no idea how to fix it |
In my case the issue happened with the origin lib https://www.npmjs.com/package/eventsource and I thought that here could be similar solution. Anyway for my case with origin lib was enough only use correct importing |
@alexfilitaryn-awtg thanks for the info |
I want to add event source in stencil component but it shows me error .
i have used this code.
The text was updated successfully, but these errors were encountered: