lundi 2 mai 2022

monaco-editor - Uncaught ReferenceError: window is not defined

I am using monaco-editor on my ember.js app,
here is my code: https://gist.github.com/dinager/4090965700f54e9d74c8899e54820353
I get the following runtime error - it does not seem to influence my app, the code editor is working perfect, but I would still like to remove this error from my console:

Uncaught ReferenceError: window is not defined
    at eval (errors.js:53:1)
    at Object.../../../../../../../../Users/my-app/client/node_modules/monaco-editor/esm/vs/base/common/errors.js (editor.worker.js:79:1)
    at __webpack_require__ (editor.worker.js:483:41)
    at eval (simpleWorker.js:8:68)
    at Object.../../../../../../../../Users/my-app/client/node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js (editor.worker.js:259:1)
    at __webpack_require__ (editor.worker.js:483:41)
    at eval (editor.worker.js:5:93)
    at Object.../../../../../../../../Users/my-app/client/node_modules/monaco-editor/esm/vs/editor/editor.worker.js (editor.worker.js:459:1)
    at __webpack_require__ (editor.worker.js:483:41)
    at editor.worker.js:523:37

seems like it fails on this line: enter image description here
what am I missing? how can I solve it?




Aucun commentaire:

Enregistrer un commentaire