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

Auto-complete is not working when used on electron

Open manojVivek opened this issue 4 years ago • 1 comments

Problem

When using the editor on an electron app, the auto-complete feature(both basic & live) is not working. And at the same time found the following error on the console and am guessing it is related:

Uncaught DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'file:///Users/user/path/to/app/worker-css.js' failed to load.

Apparently it is trying to import the file from the wrong path.

Is there a way to override the worker module path?

manojVivek avatar Oct 03 '20 05:10 manojVivek

I'm not sure if you're using the Worker, but if you don't, just add this to the options that the error will go away:

<AceEditor
  setOptions={{
    useWorker: false,
  }}
/>

italodeandra avatar Oct 13 '20 10:10 italodeandra