Open
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Relevant Package
eslint-plugin, parser, rule-tester, scope-manager, typescript-estree, type-utils, utils
Playground Link
No response
Repro Code
try {
require('source-map-support').install();
require('@typescript-eslint/typescript-estree').createProgram('fake-tsconfig.json');
} catch (err) {
console.error(err);
}
ESLint Config
No response
tsconfig
No response
Expected Result
The console correctly prints the line of code in the .js that threw the error.
Error: error TS5012: Cannot read file 'fake-tsconfig.json': ENOENT: no such file or directory, open 'fake-tsconfig.json'.
at Object.onUnRecoverableConfigFileDiagnostic (.../node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js:71:19)
Actual Result
The line of code printed by the console points to a .ts
file that is not included in the npm release.
Error: error TS5012: Cannot read file 'fake-tsconfig.json': ENOENT: no such file or directory, open 'fake-tsconfig.json'.
at Object.onUnRecoverableConfigFileDiagnostic (.../node_modules/@typescript-eslint/typescript-estree/src/create-program/useProvidedPrograms.ts:71:15)
Additional Info
Currently .js.map
files is published to npm but does not come with source .ts
files. This causes source map tools like source-map-support
to fail in converting source lines.
Related PR: #9351
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
7.13.0 |
@typescript-eslint/parser |
7.13.0 |
@typescript-eslint/rule-tester |
7.13.0 |
@typescript-eslint/scope-manager |
7.13.0 |
@typescript-eslint/typescript-estree |
7.13.0 |
@typescript-eslint/type-utils |
7.13.0 |
@typescript-eslint/utils |
7.13.0 |
Metadata
Metadata
Assignees
Labels
This change will require a new major version to be releasedThis change will require a new major version to be releasedSomething isn't workingSomething isn't workingA member of the typescript-eslint team should work on this.A member of the typescript-eslint team should work on this.