← All errors · Bolt

The requested module does not provide an export named

Exact error

Uncaught SyntaxError: The requested module '/src/components/Button.tsx' does not provide an export named 'Button'

What it means

An import uses a named import ({ Button }) but the file exports something else, typically a default export, or the name changed.

Likely causes

How to fix it

  1. Match the import to the export:

    // Button.tsx
    export default function Button() {}
    // usage
    import Button from './Button';
    
    // or named
    export function Button() {}
    import { Button } from './Button';

Related errors

Get new fixes weekly

No spam. Unsubscribe anytime. Privacy