jaredwray/cacheable

Sourcemaps point to missing source files

Closed this issue · 2 comments

When including got in my vite-based project, I got the following warnings:

! Sourcemap for "/opt/workspace/justmoon/dassie/node_modules/.pnpm/cacheable-request@10.2.12/node_modules/cacheable-request/dist/index.js" points to missing source files
! Sourcemap for "/opt/workspace/justmoon/dassie/node_modules/.pnpm/cacheable-request@10.2.12/node_modules/cacheable-request/dist/types.js" points to missing source files

After investigating, it seems that the issue is that that cacheable-request's package contains source maps (dist/*.js.map) but not the corresponding source files (src/*.ts) that they refer to. In order to fix this, you could either exclude the source maps from your published package or include the source files.

You might argue that this isn't a bug because source maps without source files at least give you more accurate stack traces despite the fact that the links to the source files will be broken links. But I didn't see any issue about this yet so I thought I'd report it in case this was unintended.

@justmoon Sorry I missed this and will get this fixed on the next release

This will be fixed on the next deployment. #257