Cannot read properties of undefined (reading 'width')
Question
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Edge Reproducible demo link NA Describe the bug How to reproduce the bug? Version: 0.18.2 We have the following error logged in our system from grapejs module. We are not sure in which scenario this error is thrown. TypeError: Cannot read properties of undefined (reading 'width') at Object.getTargetToElementFixed (https://content.domain.com/resource/makerx/static/js/module/vendors~form-designer~c7cc6222.85501132.chunk.js:2:6330393) at i.updateToolsGlobal (https://content.domain.com/resource/makerx...
Answers (2)
0.18.2 it's quite an old version, you have to upgrade
The TypeError: Cannot read properties of undefined (reading 'width') error in GrapesJS 0.18.2, originating from getTargetToElementFixed and updateToolsGlobal, indicates that GrapesJS's internal tools (such as the selector, resizer, or general canvas overlays) are attempting to read the width proper...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #6705
TypeError: Cannot read properties of undefined (reading 'toLowerCase') in keyboard handler
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? All browsers (Chrome, Safari, Firefox, Edg...
Issue #5378
Uncaught TypeError: Cannot read properties of undefined (reading 'Canvas') while dragging a component in Layer Manager Panel
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v116.0.5845.97 Reproducible demo li...
Issue #3986
Cannot read properties of undefined (reading 'uploadFile')
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v96.0.4664.45 Reproducible demo lin...
Issue #3861
JS error when press "s" or "w" key - Cannot read properties of undefined (reading 'indexOf')
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Version 94.0.4606.81 (Official Buil...
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
Embed GrapesJS in Your SaaS: A Weekend Guide
Embed GrapesJS in your SaaS and ship a white-label page builder over a weekend. Honest tradeoffs, real code, and the plugins that close the UX gap.
Tutorial
Big Updates: TinyMCE 8 and Placeholder 2.0 for GrapesJS
In May we shipped major updates to two of our most popular GrapesJS plugins β TinyMCE Inline Text Editor and Placeholder.
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.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.