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

Failed to parse sourcemap when bundling with webpack #1353

Open
DanielOrtel opened this issue Oct 22, 2024 · 0 comments
Open

Failed to parse sourcemap when bundling with webpack #1353

DanielOrtel opened this issue Oct 22, 2024 · 0 comments

Comments

@DanielOrtel
Copy link

Expected Behavior

Source map can be correctly parsed by bundlers.

Current Behavior

[email protected] fails to parse source maps, throws the following error:

Failed to parse source map from '/path/to/project/node_modules/jimp/src/index.ts' file: Error: ENOENT: no such file or directory, open '/path/to/project/node_modules/jimp/src/index.ts'

Failure Information (for bugs)

Jimp only exports the dist folder to npm, however the index.js.map has a direct reference to the src/index.ts, which is not included on npm:

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

the source file loader then tries to parse the sources array, but since it's missing, it throws a ENOENT

Steps to Reproduce

  1. import jimp into a file
  2. try to bundle with a barebones webpack config

Screenshots

Context

  • Jimp Version: 1.6.0
  • Operating System: MacOS Ventura 13.3
  • Node version: 20.18

Failure Logs

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

1 participant