-
Notifications
You must be signed in to change notification settings - Fork 23
Fix the module import workaround for Windows #174
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
base: main
Are you sure you want to change the base?
Conversation
|
Can you look at the failing tests? |
segevfiner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This project doesn't use a lock file and the latest version of @yao-pkg/pkg seems to not work with Node.js<=16. Something about not finding fs.promises.access.
|
Hrmm the tests passed locally for me... So now we have some test that's only failing in CI? |
|
I don't understand, this project CI is 18+. |
|
The pkg.config.js said to build pkg binaries with older Node.js versions. I updated this in the PR. But now something else is failing only in CI. |
|
@segevfiner please rebase this PR. |
Suprisingly we had pkg code actually hit the ERR_MODULE_NOT_FOUND on Node.js 22, but the workaround for Windows was missing there...
BTW it might be better to use `require('url').fileURLToPath()` for this?
215e4a4 to
d1adeba
Compare
segevfiner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased
|
Can you add a test for this? |
mcollina
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
Does that test fails on Windows without this patch? |
Suprisingly we had pkg code actually hit the ERR_MODULE_NOT_FOUND on Node.js 22, but the workaround for Windows was missing there...
BTW it might be better to use
require('url').fileURLToPath()for this?