Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Bug: packages incorrectly publishes .js.map breaking stack traces #9352

Copy link
Copy link
Open
@johnsoncodehk

Description

@johnsoncodehk
Issue body actions

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

No one assigned

    Labels

    breaking changeThis change will require a new major version to be releasedThis change will require a new major version to be releasedbugSomething isn't workingSomething isn't workingteam assignedA member of the typescript-eslint team should work on this.A member of the typescript-eslint team should work on this.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.