Open codmajik opened 3 months ago
Hey @codmajik! 👋🏻
I am not sure I understand the table correctly, does that mean we can freely use the with
syntax in older Node.js versions?
I'm getting this as well
Node.js v22.3.0
Same here, trying to run upgrade-kit at an adonis 5.8.0 project.
` npx @adonisjs/upgrade-kit upgrade-packages --path={{pathToProject}} file:///usr/local/lib/node_modules/@adonisjs/upgrade-kit/node_modules/@adonisjs/ace/build/src/helpers.js:3 import schema from '../schemas/command_metadata_schema.json' assert { type: 'json' }; ^^^^^^
SyntaxError: Unexpected identifier 'assert' at compileSourceTextModule (node:internal/modules/esm/utils:337:16) at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:166:18) at callTranslator (node:internal/modules/esm/loader:436:14) at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:442:30)
Node.js v22.7.0 `
Working like a charm with the LTS version of node.
+1
file:///Users/yashkumar/.npm/_npx/632aa895c0dbb5b6/node_modules/@adonisjs/ace/build/src/helpers.js:3 import schema from '../schemas/command_metadata_schema.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)
Using Latest LTS v22.11.0
Temporary solution would be nvm use 21
Package version
1.5.0
Describe the bug
NodeJS v22 dropped import assertion completely according to NodeJS docs, this was deprecated on v18.20 and completely dropped in v22.
Due to this, running the upgrade kit on anything above v21 will cause a syntax error as show in the screenshot
Reproduction repo
No response