Replies: 1 comment
-
I had a similar error when trying to install a custom language. The culprit was an old version of RequireJS on the page that added (function () {
// @ts-ignore
const oldInclude = Array.prototype.include;
// @ts-ignore
delete Array.prototype.include;
monaco.languages.setMonarchTokensProvider("mySpecialLanguage", {
tokenizer: {
root: [
[/error.*/, "custom-error"],
[/warning.*/, "custom-notice"],
[/\[info.*/, "custom-info"],
[/\[[a-zA-Z 0-9:]+\]/, "custom-date"],
],
},
});
// @ts-ignore
// eslint-disable-next-line no-extend-native
Array.prototype.include = oldInclude;
})(); Hopefully this helps someone. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Code
No response
Reproduction Steps
I am trying to implement a Monaco editor within an existing (Knockout based) application. No matter what I do I seem to get this error:
I've tried various things to get this working, but without success:
My code to create the editor currently looks like this:
Actual (Problematic) Behavior
No response
Expected Behavior
No response
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions