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

SyntaxError: Unexpected identifier 'assert' on Node 22 #18

Open
JounQin opened this issue May 14, 2024 · 1 comment
Open

SyntaxError: Unexpected identifier 'assert' on Node 22 #18

JounQin opened this issue May 14, 2024 · 1 comment

Comments

@JounQin
Copy link

JounQin commented May 14, 2024

(node:54098) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
file:///Users/JounQin/Workspaces/GitHub/eslint-plugin-sonar/node_modules/browserslist-generator/dist/esm/index.js:3
import * as compatData from '@mdn/browser-compat-data' assert { type: 'json' };
                                                       ^^^^^^

SyntaxError: Unexpected identifier 'assert'
    at compileSourceTextModule (node:internal/modules/esm/utils:337:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:163:18)
    at callTranslator (node:internal/modules/esm/loader:429:14)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:435:30)

Node.js v22.1.0
@mcuelenaere
Copy link

mcuelenaere commented May 17, 2024

Manually altering the file and changing the assert to with "fixed" it for me

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