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

SyntaxError: Named export 'GLOBSTAR' not found #431

Closed
mishaled opened this issue Oct 30, 2023 · 4 comments
Closed

SyntaxError: Named export 'GLOBSTAR' not found #431

mishaled opened this issue Oct 30, 2023 · 4 comments
Labels

Comments

@mishaled
Copy link

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.

@lforst
Copy link
Member

lforst commented Nov 3, 2023

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?

@pirey
Copy link

pirey commented Mar 14, 2024

hi @lforst this issue seems related to this one nodejs/node#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

@lforst
Copy link
Member

lforst commented Mar 15, 2024

@pirey none of that code is in our package. I wouldn't know how to change that tbh. I'd need reproduction.

@getsantry
Copy link

getsantry bot commented Aug 27, 2024

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 🥀

@getsantry getsantry bot added the Stale label Aug 27, 2024
@getsantry getsantry bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Archived in project
Archived in project
Development

No branches or pull requests

3 participants