bokub / linky

🔌 CLI tool to retrieve Linky smart meters data
GNU General Public License v3.0
226 stars 22 forks source link

SyntaxError: Unexpected identifier 'assert' #69

Open si2w opened 3 weeks ago

si2w commented 3 weeks ago

Do anyone had this issue (Sonoma 14.4.1 on Apple Silicon)?

linky
file:///opt/homebrew/lib/node_modules/linky/dist/bin/cli.js:7
import pkg from '../package.json' assert { type: 'json' };
                                  ^^^^^^

SyntaxError: Unexpected identifier 'assert'
    at compileSourceTextModule (node:internal/modules/esm/utils:338:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:103:18)
    at #translate (node:internal/modules/esm/loader:433:12)
    at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:480:27)
    at async ModuleJob._link (node:internal/modules/esm/module_job:112:19)

Node.js v23.1.0
bokub commented 3 weeks ago

Hello

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

Apparently, node 23 doesn't support "assert" anymore...

si2w commented 3 weeks ago

Indeed. Do you plan to fix this in a new version ?

bokub commented 3 weeks ago

Yeah probably later, but not right now I'm on holidays

si2w commented 3 weeks ago

Enjoy your holidays. Thanks for the good work