webpack-bundle-tracker icon indicating copy to clipboard operation
webpack-bundle-tracker copied to clipboard

@sentry/webpack-plugin deletefilesafterupload Breaks Build

Open Dresdn opened this issue 2 years ago • 0 comments

When using the deletefilesafterupload from @sentry/webpack-plugin with webpack-bundle-tracker, webpack throws an error of Error: ENOENT: no such file or directory, open 'path/to/file.map'

I assume this has to do with how generated files are handled/passed from one plugin to the next, so when the Sentry plugin removes them, that throws a wrench in things.

One option would also be to add an ignore option.

[webpack-cli] Error: ENOENT: no such file or directory, open '/project/path/build/js/user_settings.de3c34eb.js.map'
    at Object.openSync (node:fs:601:3)
    at Object.readFileSync (node:fs:469:35)
    at getSource (/project/path/node_modules/webpack-bundle-tracker/lib/index.js:31:13)
    at /project/path/node_modules/webpack-bundle-tracker/lib/index.js:180:53
    at /project/path/node_modules/lodash.foreach/index.js:221:11
    ...

Dresdn avatar Jun 14 '23 19:06 Dresdn