Skip to content
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

preact-cli errors out with node 20.10.0 (but not with 20.9.0) #1822

Closed
nocive opened this issue Oct 29, 2024 · 2 comments
Closed

preact-cli errors out with node 20.10.0 (but not with 20.9.0) #1822

nocive opened this issue Oct 29, 2024 · 2 comments

Comments

@nocive
Copy link

nocive commented Oct 29, 2024

What is the current behaviour?
It seems that with the latest node LTS version preact-cli does not work at all.
I understand this is an abandoned project and that users are encouraged to move to something else, but any advice or pointers would still be greatly appreciated.

Steps to Reproduce
Steps to reproduce the behavior:

  1. Run any preact-cli command on a node 20.10.0 environment
  2. Get a fatal error from the node engine:
$ node_modules/.bin/preact --help

  #  node[740]: void node::fs::InternalModuleStat(const v8::FunctionCallbackInfo<v8::Value>&) at ../src/node_file.cc:1037
  #  Assertion failed: (args.Length()) >= (2)

----- Native stack trace -----


----- JavaScript stack trace -----

1: .../node_modules/esm/esm.js:1:34535
2: .../node_modules/esm/esm.js:1:34176
3: .../node_modules/esm/esm.js:1:34506
4: .../node_modules/esm/esm.js:1:173374
5: ...node_modules/esm/esm.js:1:173420
6: .../node_modules/esm/esm.js:1:173521
7: .../node_modules/esm/esm.js:1:258942
8: .../node_modules/esm/esm.js:1:261569
9: e (.../node_modules/esm/esm.js:1:262673)
10: get (.../node_modules/esm/esm.js:1:262740)


Aborted (core dumped)
@rschristian
Copy link
Member

rschristian commented Oct 29, 2024

Looks like it's the esm module, which we use for parsing config files here:

You can try to open an issue upstream, but IIRC, it's not been maintained either.

@nocive
Copy link
Author

nocive commented Jan 21, 2025

For those coming across this, you can overcome the issue by replacing the esm package with this actively maintained fork which contains a patch to the above reported error.

To replace the standard-things/esm package with the suggested fork you can add the following to yarn's resolutions:

"esm": "npm:esm-wallaby@*"

@nocive nocive closed this as completed Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants