Issue #5288πŸ’¬ AnsweredOpened Aug 9, 2023by pittleCheung0 reactions

Use tsup-node build grapesjs appear Uncaught Error: Dynamic require of "codemirror/lib/codemirror" is not supported

Quick answerby artf

I think you have to address that to Vite community, the core is using webpack right now and it works as expected

Read full answer below ↓

Question

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? latest version of Chrome Reproducible demo link null Describe the bug How to reproduce the bug?tsup-node src/index.ts --format esm,cjs --legacy-output --watch What is the expected behavior? I use vite to build grapesjs What is the current behavior?<img width="1126" alt="image" src="https://github.com/GrapesJS/grapesjs/assets/114127651/26e08b79-17e9-42ca-9133-dae9a32313d4"><img width="657" alt="image" src="https://github.com/GrapesJS/grapesjs/assets/114127651/a89640e6-a3e6-4c82-84b1-d268d861e2a0"><...

Answers (2)

artfβ€’ Aug 10, 2023

I think you have to address that to Vite community, the core is using webpack right now and it works as expected

GJS Helperβ€’ May 17, 2026

The error "Uncaught Error: Dynamic require of "codemirror/lib/codemirror" is not supported" arises when you're trying to bundle GrapesJS (or a library that uses GrapesJS) with a modern bundler like tsup (especially when targeting ESM) that encounters CommonJS require() statements within the codemir...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.