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
Uncaught Error: editor._themeService.getTheme is not a function
TypeError: editor._themeService.getTheme is not a function
at Object.exports.TMToMonacoToken (tm-to-monaco-token.js:37)
at eval (index.js:45)
at Array.map ()
at Object.tokenize (index.js:42)
at TokenizationSupport2Adapter.tokenize2 (standaloneLanguages.js:208)
at safeTokenize (textModelTokens.js:372)
at TextModelTokenization._updateTokensUntilLine (textModelTokens.js:296)
at TextModelTokenization._tokenizeOneInvalidLine (textModelTokens.js:282)
at TextModelTokenization._revalidateTokensNow (textModelTokens.js:233)
at Object.eval [as callback] (textModelTokens.js:220)
at eval (errors.js:20)
index.js
// import * as monaco from "monaco-editor";// orimport*asmonacofrom"monaco-editor/esm/vs/editor/editor.api";// if shipping only a subset of the features & languages is desiredimport{loadWASM}from"onigasm";// peer dependency of 'monaco-textmate'import{Registry}from"monaco-textmate";// peer dependencyimport{wireTmGrammars}from"monaco-editor-textmate";asyncfunctionliftOff(){awaitloadWASM(`https://cdn.jsdelivr.net/npm/[email protected]/lib/onigasm.wasm`);// See https://www.npmjs.com/package/onigasm#light-it-upconstregistry=newRegistry({getGrammarDefinition: async(scopeName)=>{console.log(scopeName);return{format: "plist",content: await(awaitfetch(`https://raw.githubusercontent.com/textmate/javascript.tmbundle/master/info.plist`)).text(),};},});// map of monaco "language id's" to TextMate scopeNamesconstgrammars=newMap();grammars.set("javascript","source.js");monaco.editor.defineTheme("vs-code-theme-converted",{// Theme data});consteditor=monaco.editor.create(document.getElementById("container"),{value: [`console.log('Hello')`].join("\n"),language: "javascript",// this won't work out of the box, see below for more info,theme: "vs-code-theme-converted",// very important, see comment above});setTimeout(()=>{wireTmGrammars(monaco,registry,grammars,editor);},3000);}liftOff();
Please help, I am getting this error:
Uncaught Error: editor._themeService.getTheme is not a function
TypeError: editor._themeService.getTheme is not a function
at Object.exports.TMToMonacoToken (tm-to-monaco-token.js:37)
at eval (index.js:45)
at Array.map ()
at Object.tokenize (index.js:42)
at TokenizationSupport2Adapter.tokenize2 (standaloneLanguages.js:208)
at safeTokenize (textModelTokens.js:372)
at TextModelTokenization._updateTokensUntilLine (textModelTokens.js:296)
at TextModelTokenization._tokenizeOneInvalidLine (textModelTokens.js:282)
at TextModelTokenization._revalidateTokensNow (textModelTokens.js:233)
at Object.eval [as callback] (textModelTokens.js:220)
at eval (errors.js:20)
index.js
webpack.config.js
The text was updated successfully, but these errors were encountered: