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

bug: import attributes is not supported #1848

Closed
motss opened this issue May 18, 2024 · 2 comments
Closed

bug: import attributes is not supported #1848

motss opened this issue May 18, 2024 · 2 comments
Labels
info-needed Issue requires more information from poster

Comments

@motss
Copy link

motss commented May 18, 2024

Background

The extension stops working due to the following error:

SyntaxError: Unexpected token 'with'
    at ESMLoader.moduleStrategy (node:internal/modules/esm/translators:119:18)
    at ESMLoader.moduleProvider (node:internal/modules/esm/loader:473:14)
    at async link (node:internal/modules/esm/module_job:68:21)
(node:7938) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.
(Use `Code Helper (Plugin) --trace-warnings ...` to show where the warning was created)
(node:7938) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time

I suspect this was probably due to the current VS Code 1.89.1 does not support import attributes.

VS Code information

Version: 1.89.1
Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
Date: 2024-05-07T05:14:32.757Z
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.89.1 Chrome/120.0.6099.291 Electron/28.2.8 Safari/537.36
@dbaeumer
Copy link
Member

I guess it the the node version that doesn't support this that ships by default with VS Code.

However you can point to a locally installed node version using the eslint.runtime setting. If you point to a latest node version will it work for you?

@dbaeumer dbaeumer added the info-needed Issue requires more information from poster label May 21, 2024
@motss
Copy link
Author

motss commented May 21, 2024

TIL eslint.runtime

@dbaeumer Thanks for the suggestion and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants