nuxt / nuxt/scripts

[Tracking]: Incompability with bun

Open
#881 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

harlan-agent-wait-to-implement
Dominant language
TypeScript
Stars
584
Forks
91
Avg merge
1d 36m
Merged PRs (30d)
29

Description

[!NOTE]
I don't think there is anything to fix in this project, other than possibly adding a warning message. This is just a tracking issue, so other developers can quickly identify its cause.

@nuxt/scripts v2 uses:

import { findPackageJSON } from 'node:module'

However, Bun does not implement findPackageJSON, which can cause installation to fail with errors such as:

[error] (0 , _nodeModule.findPackageJSON) is not a function
  at readInstalledPackageVersion (data:text/javascript;base64,ZXhwb3J0IGRlZmF1bHQgKGFzeW5jIGZ1bmN0aW9uIChleHBvcnRzLCByZXF1aXJlLCBtb2R1bGUsIF9fZmlsZW5hbWUsIF9fZGlybmFtZSwgaml0aUltcG9ydCwgaml0aUVTTVJlc29sdmUpIHsgInVzZSBzdHJpY3QiO09iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAiX19lc01vZHVsZSIsIHsgdmFsdWU6IHRydWUgfSk7ZXhwb3J0cy5TVEFUSUNfUFJPWFlfUFJFU0VUUyA9IHZvaWQgMDtleHBvcnRzLmFwcG
...

This should be resolved upstream once https://github.com/oven-sh/bun/pull/37947 gets merged.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the @nuxt/scripts v2 use of node:module and Bun pull request #37947, which is identified as the upstream resolution. Done when that upstream support is merged, or when this project has a defined warning or other response for the incompatibility.

Written by the indexing model from the issue text.

Assessment

Tech stack
bun, typescript
Domain
tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.