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

does not work with vite #329

Open
ayZagen opened this issue Sep 26, 2023 · 4 comments
Open

does not work with vite #329

ayZagen opened this issue Sep 26, 2023 · 4 comments

Comments

@ayZagen
Copy link

ayZagen commented Sep 26, 2023

It throws error as global is not defined

Error: global is not defined
at node_modules/.pnpm/[email protected]/node_modules/event-stream/index.js (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/httpsnippet_src_index.js?v=8be32947:2722:23)
at __require (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/chunk-5WWUZCGV.js?v=8be32947:8:50)
at node_modules/.pnpm/[email protected][email protected]/node_modules/httpsnippet/src/index.js (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/httpsnippet_src_index.js?v=8be32947:10392:14)
at __require (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/chunk-5WWUZCGV.js?v=8be32947:8:50)
at http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/httpsnippet_src_index.js?v=8be32947:10614:16

which is because of the library event-stream is not a browser compatible lib?

Using version: 3.0.1
vite: 4.4.9

@brianvoe
Copy link

Its a node package that cant be used in from end development unless you figure out a bunch of polyfills

@tnrich
Copy link

tnrich commented Oct 25, 2024

@ayZagen looks like someone made this version work for the client - https://www.npmjs.com/package/httpsnippet-lite

(vite compatible)

@brianvoe
Copy link

OMG! you just made my night ive been running a server to make http calls to get http responses

@brianvoe
Copy link

@tnrich @ayZagen #359 Go over there comment to get this in!

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