You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I also changed mode to delelopment in webpack config.
Result:
Error: self.require is not a function
at eval (editorSimpleWorker.js:395)
at new Promise_ctor (winjs.base.js:1660)
at EditorSimpleWorkerImpl.BaseEditorSimpleWorker.loadForeignModule (editorSimpleWorker.js:393)
at SimpleWorkerServer._handleMessage (simpleWorker.js:259)
at Object.handleMessage (simpleWorker.js:245)
at SimpleWorkerProtocol._handleMessage (simpleWorker.js:117)
at SimpleWorkerProtocol.handleMessage (simpleWorker.js:89)
at SimpleWorkerServer.onmessage (simpleWorker.js:249)
at self.onmessage (editor.worker.js:23)
Why do i get this error?
It seems like the json worker is needed. But why? JSON syntax highlighting works perfectly without it. I don't want the this json worker :)
BTW, I am not running from "file://", i am using "npm run simpleserver". The standard language "python" (from that sample) works without issue.
This issue looks a bit like #759 but that issue requires a worker to fail due to some reason before it throws "self.require is not a function". This is not the case in this issue.
The text was updated successfully, but these errors were encountered:
Did you set globalobject: self in your webpack config like here?
The webworkers are responsible for enhanced suggestions and syntax errors etcs. With setting the editor language to JSON everything is going to be loaded, not only the colors.
However you can customize the imports and decide yourself what should be loaded and what not. Example
monaco-editor version: 0.11.1
Browser: chrome latest
OS: win 10 64bit
Steps or JS usage snippet reproducing the issue:
Run browser-esm-webpack-small sample with following changes:
in index.js:
I also changed mode to delelopment in webpack config.
Result:
Why do i get this error?
It seems like the json worker is needed. But why? JSON syntax highlighting works perfectly without it. I don't want the this json worker :)
BTW, I am not running from "file://", i am using "npm run simpleserver". The standard language "python" (from that sample) works without issue.
This issue looks a bit like #759 but that issue requires a worker to fail due to some reason before it throws "self.require is not a function". This is not the case in this issue.
The text was updated successfully, but these errors were encountered: