profile
viewpoint

Ask questionsProblem with insane.js while using monaco-editor@0.18.0

monaco-editor version: 0.18.0 (no problem on 0.17.1) Browser: Chrome OS: Windows

Hi, I just upgraded to version 0.18.0 today. I use monaco-editor-webpack-plugin to use the integrated ESM version. I got a message like this

Uncaught ReferenceError: __insane_exports is not defined

I have traced down the problem in /node_modules/monaco-editor/esm/vs/base/common/insane/insane/js, apparently, this is caused by line 95 (sorry I don't really know how to link to the source code)

    __insane_exports = insane;

The line let __insane_exports; was commented out at the top of the file, so that might be a problem. I have searched around a bit hoping to find the answer and I found this file, I don't know how monaco-editor has anything to do with this project but it seems like these 2 insane.js files are similar, except the one I just showed has let __insane_exports uncommented.

Could you please checked this. I have just tried this on a very simple React app using ejected create-react-app and got the same error.

NOTE: I could not reproduce this on 0.17.1

microsoft/monaco-editor

Answer questions Betalos

@blacksteed232, well i'll just wait for a solid fix, since 0.17.1 has no issue what so ever. For now just REVERT!!

useful!

Related questions

Monarch: How do you add "@keywords" key to "language object"? (undocumented) hot 3
Error: Cannot find module 'monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands' hot 2
Removing the tooltip on the read-only editor that says 'cannot edit in read-only editor' hot 1
Monaco paste event hot 1
Registering/Providing custom Commands/CodeActions hot 1
How to get the line count including line wraps hot 1
Error: Cannot find module 'monaco-editor/esm/vs/editor/contrib/goToDefinition/goToDefinitionCommands' hot 1
TypeScript declaration preview from extra lib results in error hot 1
Editor props/extends the actual width of the parent that is a flexbox item hot 1
Change the language of an existing editor hot 1
javascript/typescript typedefs lost when webworker times out hot 1
Can't scroll in firefox hot 1
How to add simple custom language support? hot 1
monaco-editor polute the global variables, making incompatible with other JS libraries, such as CodeMirror, RequireJS, SeaJS, etc. hot 1
Highlight merge conflicts in monaco like in VSCode hot 1
Github User Rank List