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 #3

Open
leoner opened this issue Mar 18, 2020 · 4 comments
Open

TypeError: SseStream is not a constructor #3

leoner opened this issue Mar 18, 2020 · 4 comments

Comments

@leoner
Copy link

leoner commented Mar 18, 2020

SseStream = require('ssestream')

console.info(SseStream)
new SseStream()

{ default: [Function: SseStream] }
TypeError: SseStream is not a constructor

@leoner leoner changed the title TypeError: sse is not a constructor TypeError: SseStream is not a constructor Mar 18, 2020
@stiv-yakovenko
Copy link

I observe the same problem.

@stiv-yakovenko
Copy link

Solution: rollback to "ssestream": "^1.0.1", this one is broken.

@Rickiiii
Copy link

Solution: rollback to "ssestream": "^1.0.1", this one is broken.

It's useless.

@rem13s
Copy link

rem13s commented Oct 13, 2021

Just use this in the code :
const SseStream = require('ssestream').default;

tyn1998 added a commit to tyn1998/hypertrons-crx that referenced this issue Jun 24, 2022
tyn1998 added a commit to hypertrons/hypertrons-crx that referenced this issue Jul 7, 2022
* refactor: convert require syntax to import syntax

* refactor: downgrade ssestream to avoild "SSEStream is not a constructor" problem

See EventSource/node-ssestream#3 (comment)

* refactor: module is not defined in pure es6 module package so remove it

The removed code is not important since we use absolute path when
calling the crx-webpack-plugin.

* fix: exsiting way to write process.env.XXX does not work

* chore: format code

* refactor: convert specific ci scripts to es6 modules

* refactor: conventional-changelog-action requires pre-commit.js as a CommonJS module
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

4 participants