Skip to content
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: SseStream is not a constructor #142

Open
poqiuhaha opened this issue Dec 7, 2020 · 2 comments
Open

TypeError: SseStream is not a constructor #142

poqiuhaha opened this issue Dec 7, 2020 · 2 comments

Comments

@poqiuhaha
Copy link

When I use example to run the program, I will be prompted
TypeError: SseStream is not a constructor
at D:\serialport\eventsource-master\example\sse-server.js:10:20
at Layer.handle [as handle_request] (D:\serialport\eventsource-master\node_modules\express\lib\router\layer.js:95:5)
at next (D:\serialport\eventsource-master\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (D:\serialport\eventsource-master\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (D:\serialport\eventsource-master\node_modules\express\lib\router\layer.js:95:5)
at D:\serialport\eventsource-master\node_modules\express\lib\router\index.js:281:22
at Function.process_params (D:\serialport\eventsource-master\node_modules\express\lib\router\index.js:335:12)
at next (D:\serialport\eventsource-master\node_modules\express\lib\router\index.js:275:10)
at SendStream.error (D:\serialport\eventsource-master\node_modules\serve-static\index.js:121:7)
at SendStream.emit (events.js:315:20)
How to solve it?

@afeurra
Copy link

afeurra commented Mar 9, 2021

Same situation, could you solve this problem?

@dpoveda2021
Copy link

Please, use:

const SseStream = require('ssestream').default;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants