Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throws an odd error when using with Bun #132

Open
ryoppippi opened this issue Jun 7, 2024 · 0 comments
Open

Throws an odd error when using with Bun #132

ryoppippi opened this issue Jun 7, 2024 · 0 comments

Comments

@ryoppippi
Copy link

ryoppippi commented Jun 7, 2024

Environment

/t/buuuuu ❱ bun --revision
1.1.12+43f0913c3
/t/buuuuu ❱ uname -mprs
Darwin 23.5.0 arm64 armf

Reproduction

mkdir -p example
cd example
bun init -y
bun add nypm@0.3.8

Edit index.ts

import {ensureDependencyInstalled} from 'nypm';
await ensureDependencyInstalled('pathe')

Then

bun run index.ts

Describe the bug

Package is installed, but odd errors come out.

Additional context

addDependency also throws an error, but it seems command ran successfully.

Logs

/t/buuuuu 1m 1.7s ❱ bun run index.ts
bun add v1.1.12 (43f0913c)
1 | export const getStreamContents = async (stream, {init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize}, {maxBuffer = Number.POSITIVE_INFINITY} = {}) => {
2 |     if (!isAsyncIterable(stream)) {
3 |             throw new Error('The first argument must be a Readable, a ReadableStream, or an async iterable.');
            ^
error: Command failed: bun add pathe
The first argument must be a Readable, a ReadableStream, or an async iterable.
      at /private/tmp/buuuuu/node_modules/get-stream/source/contents.js:3:9
      at getStreamContents (/private/tmp/buuuuu/node_modules/get-stream/source/contents.js:1:41)
      at getStreamAsString (/private/tmp/buuuuu/node_modules/get-stream/source/string.js:4:41)
      at /private/tmp/buuuuu/node_modules/execa/lib/stream.js:119:24
      at getSpawnedResult (/private/tmp/buuuuu/node_modules/execa/lib/stream.js:118:33)
      at /private/tmp/buuuuu/node_modules/execa/index.js:118:94
      at /private/tmp/buuuuu/node_modules/execa/index.js:117:24
      at /private/tmp/buuuuu/node_modules/onetime/index.js:18:18
      at /private/tmp/buuuuu/node_modules/execa/lib/promise.js:15:35

Bun v1.1.12 (macOS arm64)

installed pathe@1.1.2
@ryoppippi ryoppippi changed the title Bun install throws an error Throws and error on ensureDependencyInstalled when using with Bun Jun 7, 2024
@ryoppippi ryoppippi changed the title Throws and error on ensureDependencyInstalled when using with Bun Throws and error when using with Bun Jun 7, 2024
@ryoppippi ryoppippi changed the title Throws and error when using with Bun Throws an odd error when using with Bun Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant