Skip to content

Nix dev shell fails to install dependencies with Node.js 20 #47319

Closed

Description

@harukz

Description

I ran into this while setting up the OpenCode development environment with nix develop. The dev shell currently provides Node.js 20, and with a clean Bun cache, bun install fails during the tree-sitter-powershell postinstall.

Changing nodejs_20 to nodejs_22 in flake.nix makes the same clean install complete successfully.

Plugins

None

OpenCode version

Current dev branch (20a7743)

Steps to reproduce

Run:

nix develop
bun pm cache rm
bun install

Screenshot and/or share link

Current dev shell (nodejs_20):

> nix develop
> node --version
v20.20.2
> bun install
bun install v1.3.13 (bf2e2cec)
gyp info using node-gyp@13.0.2
gyp info using node@20.20.2 | linux | x64
gyp ERR! configure error
gyp ERR! stack TypeError: webidl.util.markAsUncloneable is not a function
...
gyp ERR! cwd .../tree-sitter-powershell@0.25.10/node_modules/tree-sitter-powershell
gyp ERR! node -v v20.20.2
gyp ERR! node-gyp -v v13.0.2
gyp ERR! not ok

After changing to nodejs_22:

> nix develop
> node --version
v22.22.2
> bun install
bun install v1.3.13 (bf2e2cec)
...
4709 packages installed [71.32s]

Operating System

NixOS 26.11 (Zokor)

Terminal

Wezterm

Activity

  1. neriousy commented on Oct 19, 2026

    @neriousy
    Member

    The Nix dev shell now uses the default nodejs package from nixpkgs instead of nodejs_20, so nix develop provides a Node version that can build tree-sitter-powershell. This changed in #52129 and is in v2.0.22 and later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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