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

Tsconfig Extends From Base Configuration as NPM package File Not Found Error #53495

Closed
wesleylhandy opened this issue Mar 24, 2023 · 2 comments
Closed
Labels
Duplicate An existing issue was already created

Comments

@wesleylhandy
Copy link

Bug Report

After upgrading to ^5.0.0, when extending a NPM tsconfig.json and running tsc --noEmit --skipLibCheck, I get a `File 'tsconfig.json' not found.

🔎 Search Terms

tsconfig, extends, File not found

🕗 Version & Regression Information

Without any other changes, my configuration in 4.9.5 works and passes as expected. Moving to 5.0.2 and the error occurs.

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: typescript@next
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:

  • This changed between versions 4.9.5 and 5.0.0

⏯ Playground Link

💻 Code

{
  "extends": "@internal-library/tsconfig.strict.json",
  "compilerOptions": {
    "jsx": "react",
    "baseUrl": ".",
    "outDir": "./dist",
    "lib": ["es6", "es2017", "es2020", "es2020.promise", "esnext.asynciterable", "DOM"],
    "esModuleInterop": true,
    "noImplicitAny": false,
    "noUnusedLocals": false,
    "noUnusedParameters": true,
    "paths": {
      "i18n": ["i18n/index.ts"],
      "i18n/non-legacy-messages": ["i18n/non-legacy-messages.ts"],
      "i18n/react-i18n": ["i18n/react-i18n/index.ts"],
      "i18n/resources": ["i18n/resources.ts"]
    }
  },
  "exclude": ["dist", "node_modules", "./cypress", "./i18n", "./publish", "./secrets"],
  "include": ["./*.ts", "./*.tsx", "./src/**/*.ts", "./src/**/*.tsx"]
}

🙁 Actual behavior

In 5.0.0+, the following command fails:

$ tsc --noEmit --skipLibCheck --excludeDirectories ./i18n
tsconfig.json:2:14 - error TS6053: File '@internal-library/tsconfig.strict.json' not found.

2   "extends": "@internal-library/tsconfig.strict.json",
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 1 error in tsconfig.json:2

🙂 Expected behavior

As happens in 4.9.5 and before, the following should succeed:

$ tsc --noEmit --skipLibCheck --excludeDirectories ./i18n
✨  Done in 7.59s.
@RyanCavanaugh
Copy link
Member

Very likely a duplicate of #53314. If not, please post the relevant contents (package.json, tsconfig path, etc) of @internal-library

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Mar 24, 2023
@wesleylhandy
Copy link
Author

@RyanCavanaugh Sorry, you are right. These seems to be a dupe. I'll follow #53314

@RyanCavanaugh RyanCavanaugh closed this as not planned Won't fix, can't repro, duplicate, stale Mar 27, 2023
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