Skip to content

Commit

Permalink
Add .node-version
Browse files Browse the repository at this point in the history
By default, Bun will respect shebang lines in CLIs that indicate that
they should be executed with Node. We could force the use of Bun in CLIs
(like `eslint` and `stylelint`) using `--bun`, but this will sometimes
lead to unexpected behaviour. Playwright doesn't seem to work very well,
for instance

Meanwhile, using `nodenv` (which is fairly standard at dxw) without
specifying a `.node-version` can lead to errors like the following when
running CLIs that try to use it:

```
nodenv: node: command not found

The `node' command exists in these Node versions:
  16.17.0
  20.9.0
  20.10.0
  20.11.0
```

This adds a `.node-version` to fix this issue

See:
- https://bun.sh/docs/cli/run#bun
- https://bun.sh/docs/cli/bunx#shebangs
  • Loading branch information
yndajas committed Feb 14, 2024
1 parent 8fd1017 commit 9fb29a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.11.1

0 comments on commit 9fb29a1

Please sign in to comment.