FusionAuth / fusionauth-node-cli

https://fusionauth.io
Other
1 stars 6 forks source link

Broken in node v22 #14

Open theogravity opened 3 weeks ago

theogravity commented 3 weeks ago

I'm trying out theming for the fusion auth hosted pages, in which the workflow looks amazing

https://fusionauth.io/docs/customize/look-and-feel/tailwind#installation

But, I'm having a problem on node v22 when I attempt to download the theme via the API as described in the docs:

file:///Users/theo/projects/monarch/developer-portal/fusion-auth-pages/node_modules/@fusionauth/cli/dist/index.js:7 import pkg from '../package.json' assert { type: 'json' };

This is because the assert syntax was changed in node v22:

https://stackoverflow.com/questions/78876691/syntaxerror-unexpected-identifier-assert-on-json-import-in-node-v22

they changed assert to with:

import config from "./some-config-file.json" with { type: "json" };

So basically @fusionauth/cli is incompatible with node v22 which is the current LTS.

theogravity commented 3 weeks ago

Note in v20 and v22, you can use with, but not with v18:

https://github.com/nodejs/node/issues/51622