Skip to content

does not work with vite #329

Open
Open

Description

@ayZagen

It throws error as global is not defined

Error: global is not defined
at node_modules/.pnpm/event-stream@3.3.4/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/httpsnippet@2.0.0_mkdirp@1.0.4/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

Activity

  1. brianvoe commented on Oct 30, 2023

    @brianvoe

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

  2. tnrich commented on Oct 25, 2024

    @tnrich

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

    (vite compatible)

  3. brianvoe commented on Oct 25, 2024

    @brianvoe

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

  4. brianvoe commented on Oct 25, 2024

    @brianvoe

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions