monaco-react icon indicating copy to clipboard operation
monaco-react copied to clipboard

Can only have one anonymous define call per script file

Open leijunping opened this issue 4 years ago • 9 comments

when i use the module, and use it in my project, i have met this error

leijunping avatar Dec 27 '20 04:12 leijunping

Hello @leijunping

Could you please provide a reproducible code snippet, or please give more info about the usage of the library?

suren-atoyan avatar Dec 27 '20 11:12 suren-atoyan

image

Each demo has a editor for the code. when I switch the demo, this issue will occur @suren-atoyan

hustcc avatar Apr 02 '21 08:04 hustcc

@hustcc could you please try to use multi-model editor as you have more than one editor?

suren-atoyan avatar Apr 02 '21 08:04 suren-atoyan

@hustcc could you please try to use multi-model editor as you have more than one editor?

Only one editor in the SPA page, but can be switch another case.

I will try multi editor.

hustcc avatar Apr 02 '21 11:04 hustcc

In my case, every editor in a different react router. When I click the item and change the router, the error occurred.

https://user-images.githubusercontent.com/7856674/113955914-34c38800-984f-11eb-8c1c-1dc97f1820d3.mp4

hustcc avatar Apr 08 '21 01:04 hustcc

image

hustcc avatar Apr 08 '21 02:04 hustcc

@hustcc do you use path property on the Editor component?

suren-atoyan avatar Oct 11 '21 14:10 suren-atoyan

@suren-atoyan same error with multiple umd libs

steps

open editor page navigate to page with another umd module same error in console

but if I go to umd first and then go to editor - its ok

dmitryshelomanov avatar Feb 03 '22 15:02 dmitryshelomanov

@dmitryshelomanov I guess the different AMD implementations are conflicting. Which "another umd module" do you use?

suren-atoyan avatar May 12 '22 16:05 suren-atoyan

I am closing this due to inactivity, feel free to re-open it

suren-atoyan avatar Jan 19 '24 17:01 suren-atoyan