preactjs / preact-cli

😺 Your next Preact PWA starts in 30 seconds.
MIT License
4.69k stars 375 forks source link

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

Open nocive opened 2 days ago

nocive commented 2 days ago

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 commented 2 days ago

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

https://github.com/preactjs/preact-cli/blob/e826f7caab0d07a27188aab04ca6e9d7d7c35314/packages/cli/src/lib/webpack/transform-config.js#L113

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