Skip to content

Could not resolve "stream" #7

@vlovich

Description

@vlovich

I'm trying to build my TypeScript project using ES Modules with ESBuild (not targeting node) and it's failing with

✘ [ERROR] Could not resolve "stream"

    node_modules/rfc2047/node_modules/iconv-lite/lib/extend-node.js:167:35:
      167 │             var Readable = require('stream').Readable;
          ╵                                    ~~~~~~~~

  The package "stream" wasn't found on the file system but is built into node. Are you trying to
  bundle for node? You can use "platform: 'node'" to do that, which will remove this error.

✘ [ERROR] Could not resolve "stream"

    node_modules/rfc2047/node_modules/iconv-lite/lib/streams.js:1:24:
      1 │ var Transform = require("stream").Transform;
        ╵                         ~~~~~~~~

  The package "stream" wasn't found on the file system but is built into node. Are you trying to
  bundle for node? You can use "platform: 'node'" to do that, which will remove this error.

#5 seemed similar so I'm wondering if there's an issue with this project + ESBuild (and or ES Modules)?

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