Skip to content

Regression in 5.3 tsconfig cannot extend node moduleΒ #56492

Closed as not planned
Closed as not planned
@jd-carroll

Description

@jd-carroll

πŸ”Ž Search Terms

tsconfig module extends

πŸ•— Version & Regression Information

Version with issue: v5.3.2

Downgraded to v5.2.2 and issue is resolved

⏯ Playground Link

No response

πŸ’» Code

Monorepo with tsconfig.json in each project that looks like:

{
  "extends": "@project/tsconfig/nextjs.json",
  "compilerOptions": {
     ...
  }
}

Structure of @project/tsconfig

packages
  |- tsconfig
      |- package.json
      |- tsconfig.json  

πŸ™ Actual behavior

Fails to run the script

monorepo % lerna run dev --scope @client-sites/main
info cli using local version of lerna
lerna notice cli v7.4.2
lerna notice filter including "@client-sites/main"
lerna info filter [ '@client-sites/main' ]
lerna info Executing command in 1 package: "yarn run dev"
@client-sites/main: /path/to/monorepo/node_modules/ts-node/src/index.ts:859
@client-sites/main:     return new TSError(diagnosticText, diagnosticCodes, diagnostics);
@client-sites/main:            ^
@client-sites/main: TSError: β¨― Unable to compile TypeScript:
@client-sites/main: error TS6053: File '@project/tsconfig/nextjs.json' not found.
@client-sites/main:     at createTSError (/path/to/monorepo/node_modules/ts-node/src/index.ts:859:12)
@client-sites/main:     at reportTSError (/path/to/monorepo/node_modules/ts-node/src/index.ts:863:19)
@client-sites/main:     at createFromPreloadedConfig (/path/to/monorepo/node_modules/ts-node/src/index.ts:874:36)
@client-sites/main:     at create (/path/to/monorepo/node_modules/ts-node/src/index.ts:624:10)
@client-sites/main:     at Object.register (/path/to/monorepo/node_modules/ts-node/src/index.ts:591:15)
@client-sites/main:     at Object.<anonymous> (/path/to/monorepo/node_modules/ts-node/register/index.js:1:16)
@client-sites/main:     at Module._compile (node:internal/modules/cjs/loader:1241:14)
@client-sites/main:     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
@client-sites/main:     at Module.load (node:internal/modules/cjs/loader:1091:32)
@client-sites/main:     at Function.Module._load (node:internal/modules/cjs/loader:938:12) {
@client-sites/main:   diagnosticCodes: [ 6053 ]
@client-sites/main: }

πŸ™‚ Expected behavior

For the script to actually run the dev server

monorepo % lerna run dev --scope @client-sites/main
info cli using local version of lerna
lerna notice cli v7.4.2
lerna notice filter including "@client-sites/main"
lerna info filter [ '@client-sites/main' ]
lerna info Executing command in 1 package: "yarn run dev"
@client-sites/main: Successfully wrote configuration: ...
...

Additional information about the issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExternalRelates to another program, environment, or user action which we cannot control.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions