Closed nmggithub closed 5 months ago
@antfu I noticed the earlier discussion in the Discord where this error appeared in CI. I believe your fix then was to pin the Node version in CI to 18.18.2. While not too important, I think this could go up to 18.19.x now that this fix has been merged in.
Issue
Attempting to follow the Contribution Guide and run:
on a new clone of the project on Node v18.19.0+ will result in the following error message (after some logs):
Research
Looking into this:
@freben
(thanks, Fredrik!),tsx
GitHub issues and found this issue mentioning the same changelog,@privatenumber
(thanks, Hiroki!), saying the issue is fixed in v4.6.1 oftsx
.The cause (error trace)
This
tsx
issue is indeed the cause in this repo.pnpm run build
runspnpm -r --filter=\"./packages/**/*\" run build
, which runs the build scripts in all packages inpackages/**/*
build
script inpackages/devtools
includesesno scripts/prepare.ts
esno
is a thin wrapper aroundtsx
,esno
includestsx
in itspackage.json
, but as^4.1.0
, which can (and does) resolve to versions earlier than the fixed v4.6.1The solution
This PR simply adds a PNPM override of
^v4.6.1
for thetsx
package.Additional comments
It would be nice if the authors of
esno
fixed the issue in theirpackage.json
, but they don't seem to be open to this as they have disabled issues on theesno
repo and have told people to open issues in thetsx
repo instead.