Skip to content

process.title is undefined, so packages that read it at load time throw #2184

Open

Description

@onmax

Describe the bug

process.title is undefined in a WebContainer. In Node it is a string ("node" by default), and some packages read it when they load. @slack/web-api builds its user agent with path.basename(process.title), so import("@slack/web-api") throws ERR_INVALID_ARG_TYPE: The "path" argument must be of type string. Received undefined before any code runs.

Link to the blitz that caused the error

https://stackblitz.com/github/onmax/repros/tree/repro/webcontainer-process-title/webcontainer-process-title-blitz

npm start prints undefined undefined, then import("@slack/web-api") fails with ERR_INVALID_ARG_TYPE. The same check through @webcontainer/api is in https://github.com/onmax/repros/tree/repro/webcontainer-process-title/webcontainer-process-title

Steps to reproduce

  1. Boot a WebContainer with @webcontainer/api 1.6.4.
  2. Run node -e "console.log(typeof process.title, process.title)".
  3. It prints undefined undefined. Object.getOwnPropertyDescriptor(process, "title") is undefined too.

In the repro: npm install && npm run verify (exits 1 while the bug is there).

Expected behavior

string node, same as Node 24 on Linux.

Parity with Local

  • I have run the project in my local machine and I could not reproduce the issue.

Platform

  • OS: Linux
  • Browser: Chromium 159 (headless)
  • Version: @webcontainer/api 1.6.4, container Node v24.22.2

Additional context

Workaround for now: preload process.title ??= "node" with NODE_OPTIONS=--import.

Activity

  1. github-actions commented on Nov 17, 2026

    @github-actions

    We noticed that you did not provide a StackBlitz or Bolt reproduction link. Please update the issue and add a link to a public project.

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