Skip to content

Unreliable tsconfig parsing when extends is used #61409

Closed
@ryan-at-onward

Description

@ryan-at-onward

Link to the code that reproduces this issue

https://github.com/ryan-nauman/tsconfig-errors-reproduction-app

To Reproduce

  1. run pnpm dev
  2. view error: TypeError: Cannot read properties of undefined (reading 'push') at writeConfigurationDefaults
  3. comment out tsconfig.base.json line 25
  4. uncomment tsconfig.base.json line 27
  5. pnpm dev
  6. notice that strictNullChecks": true, is added to tsconfig.json even thought it already exists in tsconfig.base.json line 3

Current vs. Expected behavior

I did not expect the TypeError. I did not expect strictNullChecks to be added when it existed in the base config.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:43 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6000
Binaries:
  Node: 18.19.0
  npm: 10.2.3
  Yarn: 1.22.19
  pnpm: 8.9.2
Relevant Packages:
  next: 14.1.1-canary.21 // There is a newer canary version (14.1.1-canary.23) available, please upgrade! 
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.1.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Not sure

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue was opened via the bug report template.locked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions