Skip to content

SyntaxError: Named export 'Minimatch' not found. #9935

@JasonTame

Description

@JasonTame

Astro Info

Astro                    v4.2.8
Node                     v18.17.0
System                   macOS (arm64)
Package Manager          npm
Output                   hybrid
Adapter                  @astrojs/node
Integrations             @astrojs/svelte
                         @astrojs/tailwind
                         @sanity/astro

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

After updating the @astro/vercel package to 7.1.0, I started getting 500 errors on Vercel with the error message:

file:///var/task/.vercel/output/_functions/entry.mjs:17
import { Minimatch } from 'minimatch';
         ^^^^^^^^^
SyntaxError: Named export 'Minimatch' not found. The requested module 'minimatch' is a CommonJS module, which may not support all module.exports as named exports.

Rolling back to 7.0.0 resolved the issue for now.

What's the expected result?

No 500 errors

Link to Minimal Reproducible Example

https://stackblitz.com/edit/withastro-astro-9dype5

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

Labels

needs responseIssue needs response from OP

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions