atularen / ngx-monaco-editor

Monaco Editor component for Angular 2 and Above
https://www.npmjs.com/package/ngx-monaco-editor
MIT License
428 stars 155 forks source link

TypeError: (intermediate value).create is not a function #147

Closed svendjanis closed 4 years ago

svendjanis commented 4 years ago

TypeError: (intermediate value)(intermediate value)(intermediate value).create is not a function.

I am using it as a component and opening it in another component as a dialog.

mistic100 commented 4 years ago

@svendjanis what was the issue ? can you tell how you solved it ?

mistic100 commented 4 years ago

Answering my own question : in my case I initialized the editor with content from a file loaded with webpack raw-loader. After updates from raw-loader 1.0.0 to 3.0.0 the return value of the loader changed, it is now an object with a "default" property which is the file content.

svendjanis commented 4 years ago

It was my mistake, sorry. My initial value of the editor was wrong. It was an object instead of a string

RITIKHARIANI commented 1 year ago

Hey, I am getting the same error while running Karma unit tests But I am not creating the editor anywhere. I just call <ngx-monaco-editor> with a few editor options in the html. Any idea on how I can fix this issue?