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', 'esnext', or 'system'. #117111

Closed
xon52 opened this issue Feb 20, 2021 · 2 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@xon52
Copy link

xon52 commented Feb 20, 2021

In short, I can't seem to shake this IDE error around using import.meta. I've tried it using several very different projects so I'm sure it's the IDE, but not sure what.

Version: 1.53.2 (user setup)
Commit: 622cb03f7e070a9670c94bae1a45d78d7181fbd4
Date: 2021-02-11T11:48:04.245Z
Electron: 11.2.1
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Windows_NT x64 10.0.18363

Steps to Reproduce:

  1. Have a .env file
  2. Reference "import.meta.env.SOME_KEY"

Does this issue occur when all extensions are disabled?: Yes

// tsconfig.json
{
  "compilerOptions": {
    "target": "esnext",
    "module": "esnext",
    ...
@mjbvz
Copy link
Contributor

mjbvz commented Feb 22, 2021

Does the file part of that tsconfig project? With the file open, run TypeScript: Go to project configuration to check this

@mjbvz mjbvz added the info-needed Issue requires more information from poster label Feb 22, 2021
@xon52
Copy link
Author

xon52 commented Feb 25, 2021

I'll have to close this as it's gone after a bunch of changes. If I see it again, I'll test and re-open.

@xon52 xon52 closed this as completed Feb 25, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants