Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build failed on node v22.7.0 #125

Closed
xjdrew opened this issue Dec 5, 2024 · 1 comment
Closed

build failed on node v22.7.0 #125

xjdrew opened this issue Dec 5, 2024 · 1 comment

Comments

@xjdrew
Copy link

xjdrew commented Dec 5, 2024

build log:
$ npm run build

[email protected] build /home/drew/work/wasmoon
rollup -c && tsc -d --emitDeclarationOnly --rootDir src --declarationDir dist

[!] 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)
at async ModuleJob._link (node:internal/modules/esm/module_job:106:19)

 ELIFECYCLE  Command failed with exit code 1.

import pkg from './package.json' assert { type: 'json' }

It's a same issue this one on stackoverflow, ["SyntaxError: Unexpected identifier 'assert'" on JSON import in Node v22]

This is due to support for "import assertions" being removed from Node in favour of "import attributes"

For mor information:
image

xjdrew added a commit to xjdrew/wasmoon that referenced this issue Dec 5, 2024
@ceifa
Copy link
Owner

ceifa commented Dec 24, 2024

Fixed on main

@ceifa ceifa closed this as completed Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants