Closed jmacura closed 2 weeks ago
Describe the bug
import packageJson from './package.json' assert { type: 'json'}; ^^^^^^ SyntaxError: Unexpected identifier 'assert' at compileSourceTextModule (node:internal/modules/esm/utils:340:16) at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:102: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 v22.11.0
To Reproduce Steps to reproduce the behavior:
npm run proxy
Expected behavior hslayers-server starts
Screenshots see code above
Additional context Fix will break builds on Node < 18. See https://stackoverflow.com/questions/78876691/syntaxerror-unexpected-identifier-assert-on-json-import-in-node-v22
V repozitáři je nejvyšší verze 20. Pokud je potřeba 22, tak jí mohu instalovat z Nodesource, nebo zkusit počkat - měla by se v repu objevit.
Bug
Describe the bug
To Reproduce Steps to reproduce the behavior:
npm run proxy
on Node >= 22Expected behavior hslayers-server starts
Screenshots see code above
Additional context Fix will break builds on Node < 18. See https://stackoverflow.com/questions/78876691/syntaxerror-unexpected-identifier-assert-on-json-import-in-node-v22