Skip to content

Using next-remove-imports but still can't deploy - Next.js #224

@pedromsl

Description

@pedromsl

When I try to deploy on Vercel with Next.js I always get this error

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /vercel/path0/node_modules/react-markdown/index.js

I already checked #52, used next-remove-imports but this happens.
This is my next.config.js

const removeImports = require('next-remove-imports')({})

module.exports = removeImports({
    images: {
        domains: [
            'cdn.discordapp.com',
            'discordapp.com',
        ]
    }
})

And this how I'm importing react-md-editor

import MDEditor from '@uiw/react-md-editor';
import '@uiw/react-md-editor/dist/markdown-editor.css'
import '@uiw/react-markdown-preview/dist/markdown.css';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions