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

fix: disable sourceMap in NPM package #1429

Open
tanghongxin opened this issue Aug 18, 2024 · 0 comments
Open

fix: disable sourceMap in NPM package #1429

tanghongxin opened this issue Aug 18, 2024 · 0 comments
Labels
status: needs triage Issues which needs to be reproduced to be verified report. type: fix Issues describing a broken feature.

Comments

@tanghongxin
Copy link

Description

When I am debugging my own TS project, if source-map is enabled, the stack information points to some non-existent files.

Minimal code-snippet showcasing the problem

tsc
node --enable-source-maps bundle/index.js

Expected behavior

The stack track the correct file.

Actual behavior

The source files pointed by source-map does not exist becasue they are not published on NPM at all, like this:

Error
    at HttpError (my-project/node_modules/src/http-error/HttpError.ts:16:18)
    at BadRequestError (my-project/node_modules/src/http-error/BadRequestError.ts:10:5)
    at InvalidParamError (my-project/node_modules/src/error/ParamNormalizationError.ts:10:5)
    at ActionParameterHandler.normalizeStringValue (my-project/node_modules/src/ActionParameterHandler.ts:167:17)
    at ActionParameterHandler.normalizeParamValue (my-project/node_modules/src/ActionParameterHandler.ts:136:40)
    at <anonymous> (my-project/node_modules/src/ActionParameterHandler.ts:117:39)
image
@tanghongxin tanghongxin added status: needs triage Issues which needs to be reproduced to be verified report. type: fix Issues describing a broken feature. labels Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage Issues which needs to be reproduced to be verified report. type: fix Issues describing a broken feature.
Development

No branches or pull requests

1 participant