-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
tsc apparently not picking up tsconfig.json #6591
Comments
What is the expected behavior? |
That it compiles without errors? If I manually provide the |
The problem is that
|
Aha! Not very intuitive, but I suppose I can live with that. Still, I wonder if the error message could be improved to somehow indicate this to the user. Maybe whenever the |
@DanielRosenwasser From Here https://code.visualstudio.com/Docs/languages/typescript
The
When I remove So, is the vscode doc wrong or is this a change in the recent versions of |
you can either pass file names to the compiler on the commandline, and the tsconfig.json will be ignored, or you can run tsc with no arguments and the tsconfig.json will be picked up automatically. consider setting args to |
If I run:
I get the following error:
foo.ts(1,25): error TS1148: Cannot compile modules unless the '--module' flag is provided.
In the same directory is my tsconfig.json file:
And here is the file I'm trying to compile:
Now, if I manually provide the
--module
and--target
flags, everything compiles as expected:Somehow, it's not picking up the tsconfig.json file
compilerOptions
?The text was updated successfully, but these errors were encountered: