question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with insane.js while using monaco-editor@0.18.0

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:39
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

12reactions
Betaloscommented, Sep 5, 2019

I also want to add a warning that pops up in 0.18.0:

WARNING in ./node_modules/monaco-editor/esm/vs/base/worker/defaultWorkerFactory.js 35:32-39
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
9reactions
alexdimacommented, Sep 19, 2019

I just published 0.18.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

while - JavaScript - MDN Web Docs - Mozilla
The while statement creates a loop that executes a specified statement as long as the test condition evaluates to true. The condition is ......
Read more >
JavaScript while Loop - W3Schools
The while loop loops through a block of code as long as a specified condition is true. Syntax. while (condition) { // code...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found