sentry-javascript-bundler-plugins
sentry-javascript-bundler-plugins copied to clipboard
SyntaxError: Named export 'GLOBSTAR' not found
Environment
We are running version ^2.8.0.
Once in a while, we start having persistent errors like this-
failed to load config from ***/vite.config.mjs
error during build:
import { GLOBSTAR } from 'minimatch';
^^^^^^^^
SyntaxError: Named export 'GLOBSTAR' not found. The requested module 'minimatch' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'minimatch';
const { GLOBSTAR } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)
Steps to Reproduce
We are building a Vite project and uploading sourcemaps to Sentry with the plugin. The errors reproduce both locally and in our CI (jenkins).
Expected Result
No error in the build process.
Actual Result
An error reported.
Hm, I am not sure how I can reproduce this. Would you mind sharing a small reproduction example (repo we can pull or stackblitz or similar) so we can debug this?
hi @lforst this issue seems related to this one https://github.com/nodejs/node/issues/35893
the issue might be caused by
import { GLOBSTAR } from 'minimatch'
and can be resolved by change it to
import minimatch from 'minimatch'
const { GLOBSTAR } = minimatch
@pirey none of that code is in our package. I wouldn't know how to change that tbh. I'd need reproduction.
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀