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

Module causes failures in node version 22 #704

Closed
aldenbe opened this issue Apr 26, 2024 · 1 comment · Fixed by #708
Closed

Module causes failures in node version 22 #704

aldenbe opened this issue Apr 26, 2024 · 1 comment · Fixed by #708
Labels

Comments

@aldenbe
Copy link

aldenbe commented Apr 26, 2024

Fails when using node v22 with error:

[semantic-release] › ✘  An error occurred while running semantic-release: 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:416:14)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:422:30)
SyntaxError: Unexpected identifier 'assert'

Caused by:

nodejs/node@25c79f3331

esm: drop support for import assertions (Nicolò Ribaudo) #52104

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment