Skip to content

Errors regarding package use in Next.js + Typescript project due to module conflict #438

Closed
@alpharomercoma

Description

@alpharomercoma

I'm using react-md-editor with next-remove-imports in a Next.js + Typescript project but getting blocked by the hordes of errors from importing the "commands" to add shortcuts to the title and aria-label of the buttons. I have read through previous issues of related errors but none seem to fix it for me. I have tried many combinations of implementation but all lead to errors such as

  1. Error: Must use import to load ES Module:
  2. Error: require() of ES Module
  3. Cannot use import statement outside module
    ...and some others.

I have spun a replit with the error below. I tried adding "type": "module" in the package.json but it doesn't run.
https://replit.com/@alphacoma/react-md-editor-error-1

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