BUG: GrapesJS v0.21.5 Doesn't Work in NodeJS (Headless)
Question
GrapesJS version
- I confirm to use the latest version of GrapesJS
What browser are you using?
ChromeV117.0.5938.62
Reproducible demo link
https://stackblitz.com/edit/node-1zsusv
Describe the bug
How to reproduce the bug?
Run node index.js to start application.
What is the expected behavior? ...
What is the current behavior?
node index.js
error TypeError: grapesjs.init is not a function
at Object.eval (file:///home/projects/node-1zsusv/index.js:95:27)
at Object.function (https://node1zsusv-qefh.w-credentialless.staticblitz.com/blitz.ef0c375a.js:334:156846)
at Module._compile (https://node1zsusv-qefh.w-credentialless.staticblitz.com/blitz.ef0c375a.js:57:14311)
at Module._extensions..js (https://node1zsusv-qefh.w-credentialless.staticblitz.com/blitz.ef0c375a.js:57:14990)
at Module.load (https://node1zsusv-qefh.w-credentialless.staticblitz.com/blitz.ef0c375a.js:57:13006)
at Module._load (https://node1zsusv-qefh.w-credentialless.staticblitz.com/blitz.ef0c375a.js:57:9950)
at Function.executeUserEntryPoint [as runMain] (https://node1zsusv-qefh.w-credentialless.staticblitz.com/blitz.ef0c375a.js:168:693)
at https://node1zsusv-qefh.w-credentialless.staticblitz.com/blitz.ef0c375a.js:298:142
at 𝐰𝐜_0x126b (https://node1zsusv-qefh.w-credentialless.staticblitz.com/blitz.ef0c375a.js:298:162)
at _0x5c6800 (https://node1zsusv-qefh.w-credentialless.staticblitz.com/blitz.ef0c375a.js:329:41363)
If is necessary to execute some code in order to reproduce the bug, paste it here below:
const editor = grapesjs.init({ headless: true });
Code of Conduct
- I agree to follow this project's Code of Conduct
Answers (2)
Can you check with the latest version https://github.com/GrapesJS/grapesjs/releases/tag/v0.21.6
Thank you so much @artf this works perfectly.
Can you check with the latest version https://github.com/GrapesJS/grapesjs/releases/tag/v0.21.6
Related Questions and Answers
Continue research with similar issue discussions.
Issue #4572
BUG: Page update event doesn't fire
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? chrome Reproducible demo link https://jsfi...
Issue #4448
BUG: Error on resize image.
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Brave Browser Last version Reproducible de...
Issue #5141
BUG: component resets attribute values on updating traits ( first time only )
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Version 113.0.5672.63 Reproducible...
Issue #5232
BUG: Worker - Headless "document is not defined"
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? 114.0.5735.133 Reproducible demo link Impo...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.