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

--outDir is not recognized if --build is used when running tsc #43557

Closed
gh-andre opened this issue Apr 6, 2021 · 1 comment
Closed

--outDir is not recognized if --build is used when running tsc #43557

gh-andre opened this issue Apr 6, 2021 · 1 comment
Labels
Duplicate An existing issue was already created

Comments

@gh-andre
Copy link

gh-andre commented Apr 6, 2021

Bug Report

If tsc is executed with --build, supplying --outDir fails:

tsc --build --outDir /var/tmp/my-app tsconfig.myapp.json

The error is reported as:

error TS5072: Unknown build option '--outDir'.

🔎 Search Terms

"--outDir" "--build"

🕗 Version & Regression Information

tsc v4.2.2

  • This is a crash
  • This changed between versions ______ and _______
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about build, outDir, incremental
  • I was unable to test this on prior versions because _______

⏯ Playground Link

N/A

💻 Code

N/A

🙁 Actual behavior

Error reported instead of generating compiled files in the specified directory.

error TS5072: Unknown build option '--outDir'.

🙂 Expected behavior

Expect compiled files generated in the specified directory. This is required for CI pipelines to work without having to modify the source, so build output is generated in the build directory for the current pipeline run and not in the source directory, as it is done in development.

I also will add that the docs are written like a novel not as a technical documentation and it's very hard to navigate them. For this specific issue, it should list which options --build can be combined with and which won't work with it. If somehow, in some unimaginable way, this turns out to be behavior by design, you should update the docs saying that --build generates incremental builds only in the project's outDir and cannot be changed via CLI options.

@sheetalkamat
Copy link
Member

Duplicate of #25613

@sheetalkamat sheetalkamat marked this as a duplicate of #25613 Apr 6, 2021
@sheetalkamat sheetalkamat added the Duplicate An existing issue was already created label Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

2 participants