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

ERROR TypeError: (intermediate value)(intermediate value)(intermediate value).request is not a function #236

Open
udhayakumarcp opened this issue Jan 4, 2022 · 2 comments

Comments

@udhayakumarcp
Copy link

Hi Team,

I am using this package in the Angular application. Please find angular environment details below
image

I am trying to use SSE through this package by using the following code

import  EventSource  from 'eventsource';

const eventSourceUrl = 'http://localhost:3000/v1/notifications';

const eventSourceInitDict = { headers: { Authorization: 'Tokken' } };
const noticationEventSource = new EventSource(eventSourceUrl, eventSourceInitDict);

But unfortunately, it throws the following error
ERROR TypeError: (intermediate value)(intermediate value)(intermediate value).request is not a function

@kevincentius
Copy link

I am getting the same error in Angular 13

ERROR Error: Uncaught (in promise): TypeError: (intermediate value)(intermediate value)(intermediate value).request is not a function
TypeError: (intermediate value)(intermediate value)(intermediate value).request is not a function
    at connect (eventsource.js:146:37)
    at new EventSource (eventsource.js:283:3)
    ...
    at tryCatch (runtime.js:63:40)
    at Generator.invoke [as _invoke] (runtime.js:294:22)
    at Generator.next (runtime.js:119:21)
    at tslib.es6.js:76:1
    at new ZoneAwarePromise (zone.js:1387:29)
    at __awaiter (tslib.es6.js:72:1)
    ...
    at resolvePromise (zone.js:1213:31)
    at new ZoneAwarePromise (zone.js:1390:17)
    at __awaiter (tslib.es6.js:72:1)
    ...
    at executeListenerWithErrorHandling (core.mjs:14979:16)
    at wrapListenerIn_markDirtyAndPreventDefault (core.mjs:15017:22)
    at HTMLButtonElement.<anonymous> (platform-browser.mjs:466:38)
    at ZoneDelegate.invokeTask (zone.js:406:31)
    at Object.onInvokeTask (core.mjs:25535:33)

@zeid0ne
Copy link

zeid0ne commented Apr 5, 2023

Hi, i have the same error with vue, in an electron app using vite and quasar.

eventsource version : 2.0.2

image

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