arnvanhoutte / ng-gutenberg

8 stars 5 forks source link

Files not found #1

Open Meistercoach83 opened 5 years ago

Meistercoach83 commented 5 years ago

Hey Arn, first of all: Thanks for your work for integrating this editor in angular. I tried installing and including the files - but I get an

File to import not found or unreadable: ./base-styles/colors.
      in ~ng-gutenberg/ng-gutenberg.scss (line 1, column 1)

There is no directory base-styles?

I changed it to this import:

@import "~@wordpress/base-styles/colors";
@import "~@wordpress/base-styles/variables";
@import "~@wordpress/base-styles/mixins";
@import "~@wordpress/base-styles/breakpoints";
@import "~@wordpress/base-styles/animations";
@import "~@wordpress/base-styles/z-index";
// @import "~@wordpress/base-styles/reset";
// @import "~@wordpress/base-styles/editor-styles";

@import '~@wordpress/components/build-style/style.css';
@import '~@wordpress/block-editor/build-style/style.css';
@import '~@wordpress/block-library/build-style/style.css';
@import '~@wordpress/block-library/build-style/editor.css';
@import '~@wordpress/block-library/build-style/theme.css';
@import '~@wordpress/format-library/build-style/style.css';

So the errors are fixed - but no I get an Uncaught (in promise): Error: BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.

arnvanhoutte commented 5 years ago

Can you try to copy this folder to your main directory where you run the styles.scss file?

Meistercoach83 commented 5 years ago

@arnvanhoutte as i said: i got the missing files from @wordpress directly - but now I have the error Uncaught (in promise): Error: BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead

arnvanhoutte commented 5 years ago

The files you have from wordpress are different. You need the ones that I linked For the other error, can you post me the modules you have imported where you loaded the NgGutenbergModule from?

Meistercoach83 commented 5 years ago

still getting the error Uncaught (in promise): Error: BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.

arnvanhoutte commented 5 years ago

Can you show me your module imports?

Meistercoach83 commented 5 years ago

I added you to my repo

arnvanhoutte commented 5 years ago

Okay, I'll check when I get home (in about 90 minutes)

Meistercoach83 commented 4 years ago

Good Morning Arn,

I checked the angular-react package and found this article: https://github.com/microsoft/angular-react/wiki

For the usage it says

In your AppModule, change BrowserModule to AngularReactBrowserModule.

Just like BrowserModule, AngularReactBrowserModule should only be imported once, at the top of the module hierarchy

I did that and now the editor is displayed