Skip to content

Does not work in browsers as of 5.3.1 #525

Closed
@cbrianball

Description

@cbrianball

Describe the Bug
Based on other issues in this repo and some of the examples, it looks like this package is expected to work in the browser. Using any version after 5.3.0, there is an error in the browser console with the text "process is not defined".

Steps to Reproduce

  1. Create website project (e.g., npm create vite@latest)
  2. Install any version of cloudevents > 5.3.0
  3. Add import { CloudEvent } from "cloudevents" to a javascript file (and use it to ensure tree shaking doesn't remove the code).
  4. Run the application
  5. Note in the browser console, the error "process is not defined"

The issue appears to be caused by the util dependency introduced in 5.3.1.

Expected Behavior
cloudevents NPM package should work inside the browser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions