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' #69

Open
si2w opened this issue Nov 3, 2024 · 4 comments · May be fixed by #70
Open

SyntaxError: Unexpected identifier 'assert' #69

si2w opened this issue Nov 3, 2024 · 4 comments · May be fixed by #70

Comments

@si2w
Copy link

si2w commented Nov 3, 2024

Do anyone had this issue (Sonoma 14.4.1 on Apple Silicon)?

linky
file:///opt/homebrew/lib/node_modules/linky/dist/bin/cli.js:7
import pkg from '../package.json' assert { type: 'json' };
                                  ^^^^^^

SyntaxError: Unexpected identifier 'assert'
    at compileSourceTextModule (node:internal/modules/esm/utils:338:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:103: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 v23.1.0
@bokub
Copy link
Owner

bokub commented Nov 3, 2024

Hello

https://stackoverflow.com/questions/78876691/syntaxerror-unexpected-identifier-assert-on-json-import-in-node-v22

Apparently, node 23 doesn't support "assert" anymore...

@si2w
Copy link
Author

si2w commented Nov 3, 2024

Indeed. Do you plan to fix this in a new version ?

@bokub
Copy link
Owner

bokub commented Nov 3, 2024

Yeah probably later, but not right now I'm on holidays

@si2w
Copy link
Author

si2w commented Nov 3, 2024

Enjoy your holidays. Thanks for the good work

@dpobel dpobel linked a pull request Nov 16, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants