Module "ngx-grapesjs" has no exported member NgxGrapesjsModule
narimanam opened this issue · 3 comments
narimanam commented
Hi,
I encountered an error in the first step of adding ngx-grapesjs
. It appears that NgxGrapesjsModule
is missing from the ngx-grapesjs
package. Did I overlook something?
For context, I'm using Angular version 18. Here's what I did:
- Installed
grapesjs
. - Added
grapesjs-preset-webpage
andgrapesjs-blocks-basic
. - Used
ng add
to integratengx-grapesjs
and selected the Webpage Editor option.
Any insights on what might be going wrong?
bampakoa commented
Hey there! In the latest version of the library, that is 18.0.0, we migrated to the standalone API. Which version do you use?
GregLtrnr commented
I just had the same issue, you can fix it by importing the editors directly from ngx-grapesjs as following and add them to the import:
import {
NgxNewsletterEditorComponent,
NgxWebpageEditorComponent,
} from 'ngx-grapesjs';
@Component({
selector: 'app-root',
standalone: true,
imports: [
NgxWebpageEditorComponent, // new imports here
NgxNewsletterEditorComponent,
],
templateUrl: './app.component.html',
styleUrl: './app.component.scss',
})
bampakoa commented
@GregLtrnr that's correct! It appears that the README file in the npm registry has not been updated with the correct usage described here.