Skip to content

Runtime warning about "Could not create web worker(s)..." #853

Closed
@jhk-mjolner

Description

@jhk-mjolner

Full warnings I get are

Image

Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq

I don't think I'm getting the UI freezes it mentions, but the warning appeared when I changed from using the buildWorkerDefinition() method from the monaco-editor-workers package to using the new useWorkerFactory method of building/initializing workers. Or it could be from updating the monaco-languageclient packages, I'm not sure, but I don't think I can use monaco-editor-workers with the newer monaco-languageclient packages.
I'm using the monaco-editor-wrapper, but the warnings also appear in a branch I have where I'm not using the wrapper, so it doesn't appear to be related to that.

It seems to be only about the simpleWorker, and it happens even if I don't include the 'TextEditorWorker' and 'TextMateWorker' functions under workerLoaders for the useWorkerFactory() call like it is here

I'm using Angular and Webpack, and these versions of monaco packages:
monaco-editor: 0.52.2,
monaco-editor-wrapper: 6.2.5
monaco-languageclient: 9.2.5

A bit more from the console log in case it's relevant:
Image

My code where I'm using monaco editor can be seen here

I'll reiterate that I'm not seeing errors or anything breaking that I'm aware of, but I'm guessing it's not intended.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions