Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read properties of undefined (reading 'VSCODE_BROWSER_CODE_LOADING' #256

Open
m-russ opened this issue Jun 14, 2022 · 2 comments

Comments

@m-russ
Copy link

m-russ commented Jun 14, 2022

Having an issue getting this working in angular 12. I'm running the boilerplate set up in the example. I am receiving this error in the console when I try to load the component Uncaught TypeError: Cannot read properties of undefined (reading 'VSCODE_BROWSER_CODE_LOADING' .

"@angular/cdk": "^12.2.9",
"monaco-editor": "^0.24.0",
"ngx-monaco-editor": "^12.0.0"

app.module.ts

import { MonacoEditorModule } from 'ngx-monaco-editor';

@NgModule({
  declarations: [
    ...
  ],
  imports: [
    ...
    MonacoEditorModule.forRoot()
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

editor.component.html

<ngx-monaco-editor [options]="editorOptions" [(ngModel)]="code"></ngx-monaco-editor>

editor.component.ts

...

export class EditorComponent implements OnInit, OnDestroy {
  editorOptions = {theme: 'vs-dark', language: 'javascript'};
  code: string= 'function x() {\nconsole.log("Hello world!");\n}';
  ...
}
@pakollimar
Copy link

could you please elaborate the issue, I didn't get you properly!

@m-russ
Copy link
Author

m-russ commented Jun 14, 2022

I am receiving this error: Uncaught TypeError: Cannot read properties of undefined (reading 'VSCODE_BROWSER_CODE_LOADING' in the web console when I try to load the <ngx-monaco-editor> element after following the sample code in the README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants