Skip to content

Fails silently when compilerOptions.incremental = true #906

Closed
@chrisvasz

Description

@chrisvasz

When I set compilerOptions.incremental to true, this command fails silently with no output:

npx tsgo -p . --noEmit --extendedDiagnostics

Here's my whole tsconfig.json file:

{
  "include": ["."],
  "exclude": [
    "node_modules",
  ],
  "compilerOptions": {
    "incremental": true,
    "downlevelIteration": true,
    "lib": ["es2023", "dom"],
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "jsx": "react-jsx",
    "isolatedModules": true,
    "noEmit": true,
    "noImplicitAny": true,
    "noImplicitOverride": true,
    "strict": true,
    "target": "es2020",
    "module": "esnext",
    "moduleResolution": "Bundler",
    "resolveJsonModule": true,
    "baseUrl": ".",
  }
}

If I remove the incremental: true line, the above command runs and gives diagnostic output.

Activity

yue4u

yue4u commented on May 22, 2025

@yue4u

It took me a bit to figure out exit code 7 is defined here for ExitStatusNotImplementedIncremental

jakebailey

jakebailey commented on May 22, 2025

@jakebailey
Member

Yeah, we should be printing an error, or better, just ignoring the option.

LukeAbby

LukeAbby commented on May 22, 2025

@LukeAbby
Contributor

I just ran into this too, it took me a while to realize that I needed to disable incremental.

jakebailey

jakebailey commented on May 22, 2025

@jakebailey
Member

I'll send a PR quick that just removes this error and just runs the compilation normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @chrisvasz@jakebailey@yue4u@LukeAbby

      Issue actions

        Fails silently when `compilerOptions.incremental = true` · Issue #906 · microsoft/typescript-go