Module not found: Error: Can't resolve 'utils/mixins'
You shouldn't try to compile grapesjs source code as the source could contain bundler-related content (as the one you mention, it's not an external package)
Read full answer below βQuestion
GrapesJS version
- I confirm to use the latest version of GrapesJS
What browser are you using?
chrome 106
Reproducible demo link
localhost
Describe the bug
i updated my project containing grapesjs, however now i get this error:
when i run my project, i get this error:
Failed to compile.
Module not found: Error: Can't resolve 'utils/mixins' in /node_modules/grapesjs/src/common'
ERROR in ./node_modules/grapesjs/src/common/module.js 2:0-58
this is what top 2 lines of module.js has:
import { isString, isElement } from 'underscore';
import { createId, deepMerge, isDef } from 'utils/mixins';
I have tried installing:
npm i utils/mixins
but it fails too
how can i solve it please?
Code of Conduct
- I agree to follow this project's Code of Conduct
Answers (4)
You shouldn't try to compile grapesjs source code as the source could contain bundler-related content (as the one you mention, it's not an external package)
@artf you shouldn't try to close tickets without reading them first.
If you will read the issue, you will see that i mentioned when i "updated" it, i updated it using npm i by changing grapesjs version in package.json to latest version.
The code breaks from 0.19.4 onwards, since you started using .ts file in modules.ts
Yeah I understand that you have simply updated the version but it looks like you're trying to read the source of the grapesjs package, which is wrong (probably in the future, the src folder will be even removed)
Thanks for reporting this, @nabtron.
Security and dependency issues are important. The GrapesJS team actively works on keeping dependencies up-to-date.
For you right now:
- Run
npm audit fixto see available patches - Check for a newer GrapesJS version that may have already addressed this
- If available, test the latest stable release before upgrading
- If the vulnerability is critical,
npm audit fix --forceis an option, but test thoroughly
Understanding the risk:
- Review the specific vulnerability details on GitHub Security Advisories
- Not all high-severity issues affect your code path
- Some vulnerabilities only trigger under specific conditions
Staying current:
- Watch for new GrapesJS releases
- Subscribe to security notifications on the repo
- The team prioritizes security updates in their release cycle
Related Questions and Answers
Continue research with similar issue discussions.
Issue #4854
export 'default' not found in 'backbone' (module has no exports)
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Firefox 109 Reproducible demo link none De...
Issue #5742
Building on Windows 10+
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v122 Reproducible demo link N/A Des...
Issue #5154
TS2416: Property '_up' in type 'PropertyStack' is not assignable to the same property in base type 'PropertyComposite<PropertyStackProps>'
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? ---- Reproducible demo link https://codesa...
Issue #5149
Non-named plugins and options
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? all and none, the bug is during the build...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins β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.
Tutorial
Find the Right GrapesJS Plugin in Seconds: Smarter Discovery Is Live
We're shipping a set of discovery upgrades. New label filters, a proper compatibility switch for GrapesJS vs Studio, one-click and a smarter sort bar.
Tutorial
GJS Market 2.0 - Donations, Tracking, Labels and Better Product Discovery
Weβve rolled out a new set of GrapesJS marketplace updates across GJS Market, focused on improving how creators distribute products
Tutorial
Preset DevFuture 2.0 β New Update Released
Preset continues evolving as a clean, production-ready starting point for building visual editors powered by GrapesJS
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.