braidnetworks / dynohot

Hot module reloading for nodejs
ISC License
81 stars 3 forks source link

`Firebase Command Line Tools` related error using `Node.js` version `22.x` #9

Open kireerik opened 3 days ago

kireerik commented 3 days ago

I am getting the following error with the above Node.js version:

hot:module?url=file%3A%2F%2F%2F...%2Fnode_modules%2F.pnpm%2Ffirebase-tools%4013.12.0_encoding%400.1.13%2Fnode_modules%2Ffirebase-tools%2Flib%2Findex.js:1
import * as namespace from "file:///.../node_modules/.pnpm/firebase-tools@13.12.0_encoding@0.1.13/node_modules/firebase-tools/lib/index.js" assert {};

                                           ^^^^^^

SyntaxError: Unexpected identifier 'assert'
    at compileSourceTextModule (node:internal/modules/esm/utils:337:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:164:18)
    at callTranslator (node:internal/modules/esm/loader:429:14)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:435:30) {
  __stack: [ CallSite {}, CallSite {}, CallSite {}, CallSite {} ]
}

Node.js v22.3.0
 ELIFECYCLE  Command failed with exit code 1.

  Without using dynohot I don't get the above error(, but this other known one:

).

  Using Node.js version 21.x there is no error at all and features work as expected.

laverdet commented 3 days ago

Hi there it would help if you posted a minimal reproduction case. This would include: source files, package.json contents, and the command-line arguments used to invoke nodejs.

kireerik commented 3 days ago

Sure. You can use this one: https://github.com/kireerik/refo (This one uses Superstatic directly and has the same error.)

pnpm dev

laverdet commented 3 days ago

Ah ok sorry I fixed this a long time ago in our local repository but never pushed it out here, so I was confused. Can you try v1.2.0 and see if it works?