Skip to content

The requested module 'get-stream' does not provide an export named 'buffer' #2265

@mshima

Description

@mshima

Describe the bug

  • Node.js version: 16.20.0
  • OS & version:

Actual behavior

import { buffer as getBuffer } from 'get-stream';
         ^^^^^^
SyntaxError: The requested module 'get-stream' does not provide an export named 'buffer'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:530:24)

Expected behavior

Module should be imported correctly

Code to reproduce

Package content at (dist/source/core/index.js):

import { buffer as getBuffer } from 'get-stream';

get-stream is a commonjs package.

Checklist

  • I have read the documentation.
  • I have tried my code with the latest version of Node.js and Got.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions