Closed atoyansk closed 1 year ago
I'm trying to use GrapesJS in Angular 14 project, but I faced an error in 'node_modules\grapesjs-preset-newsletter\dist\index.d.ts' file:
error TS2694: Namespace '"grapesjs"' has no exported member 'Plugin'.
Specifically in this point:
export type RequiredPluginOptions = Required<PluginOptions>; declare const plugin: grapesjs.Plugin<PluginOptions>; export { plugin as default, };
I initiated the editor like this:
this.editor = grapesjs.init({ container: '#gjs', fromElement: true, height: '700px', width: 'auto', storageManager: false, panels: { defaults: [] }, plugins: [plugin], pluginsOpts: { [plugin]: { blocksBasicOpts: { blocks: ['sect100', 'sect50', 'sect30', 'divider', 'text', 'grid-items', 'image', 'button', 'list-items', 'quote'], flexGrid: 1, }, } } });
In package.json:
"grapesjs": "^0.21.1", "grapesjs-preset-newsletter": "^1.0.1", "juice": "^9.0.0"
in angular.json:
"styles": [ "node_modules/grapesjs/dist/css/grapes.min.css", "node_modules/grapesjs-preset-newsletter/dist/grapesjs-preset-newsletter.min.css", "src/styles.scss" ], "scripts": [ "node_modules/grapesjs/dist/grapes.min.js", "node_modules/grapesjs-preset-newsletter/dist/grapesjs-preset-newsletter.min.js" ]
Have I missed to install something earlier?
Should be fixed here https://github.com/GrapesJS/preset-newsletter/releases/tag/v1.0.2
I'm trying to use GrapesJS in Angular 14 project, but I faced an error in 'node_modules\grapesjs-preset-newsletter\dist\index.d.ts' file:
error TS2694: Namespace '"grapesjs"' has no exported member 'Plugin'.
Specifically in this point:
I initiated the editor like this:
In package.json:
in angular.json:
Have I missed to install something earlier?