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

Source maps reference files not published to NPM #109

Open
vdh opened this issue Aug 21, 2024 · 1 comment
Open

Source maps reference files not published to NPM #109

vdh opened this issue Aug 21, 2024 · 1 comment

Comments

@vdh
Copy link

vdh commented Aug 21, 2024

Is this a support request?
No

Describe the bug
The source maps reference files that get excluded from the distributions published to NPM, causing source mapping errors

e.g. in index.js.map

{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"]…

The entire src folder is not included

To reproduce
Try to debug SDK calls in VSCode

Expected behavior
Either the source maps should not reference missing files, or the source files should be published to NPM

Logs

Could not load source '(local path omitted)/node_modules/@launchdarkly/js-server-sdk-common/src/LDClientImpl.ts': Unable to retrieve source content.

SDK version
@launchdarkly/node-server-sdk@npm:^9.5.0, @launchdarkly/js-sdk-common@npm:2.5.0, @launchdarkly/js-server-sdk-common@npm:2.4.4

Language version, developer tools
Node v18.13.0, VSCode 1.92.2

OS/platform
macOS 14.6.1 (23G93)

@kinyoklion
Copy link
Member

Hello @vdh,

I think you are in the wrong repository. This is for the common library used by client-side JavaScript SDKs. It is written in JavaScript and not minified, so it has no source maps.

The repository containing all the references projects is here: https://github.com/launchdarkly/js-core

In that case the source is not included in the package, but you can download it from the respository for the tags that you want to debug.

"Either the source maps should not reference missing files, or the source files should be published to NPM"

I think more likely we would not include source maps. These packages are not minified (though they are written in typescript), so the JS is directly readable.

Thanks,
Ryan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants