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

The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.Vetur(1343) #3708

Open
4 tasks done
UUmaGii opened this issue Jun 13, 2023 · 3 comments

Comments

@UUmaGii
Copy link

UUmaGii commented Jun 13, 2023

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ
  • I have tried restarting VS Code or running Vetur: Restart VLS

Info

  • Platform: Win
  • Vetur version:0.37.3

Problem

i use "npm init vue@latest" init a vue project,this project has config esnext in tsconfig , but still has an alarm

The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.Vetur(1343)

this is my code
image

The above code can run normally, it seems like that vetur can't identify this grammar, but I hope Vetur doesn't give an alarm prompt

@UUmaGii
Copy link
Author

UUmaGii commented Jun 13, 2023

this is vue project default-tsconfig.node.json
{
"extends": "@tsconfig/node18/tsconfig.json",
"include": ["vite.config.", "vitest.config.", "cypress.config.", "playwright.config."],
"compilerOptions": {
"composite": true,
"module": "esnext",
"types": ["node"]
}
}

@busyhe
Copy link

busyhe commented Aug 1, 2024

VSCode select Typescript Version to Workspace version

@UUmaGii
Copy link
Author

UUmaGii commented Aug 1, 2024 via email

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