monaco-editor icon indicating copy to clipboard operation
monaco-editor copied to clipboard

[Bug] globalDefine is not a function

Open create3000 opened this issue 1 year ago • 2 comments

Reproducible in vscode.dev or in VS Code Desktop?

  • [x] Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

No response

Monaco Editor Playground Code

No response

Reproduction Steps

As of version 0.51.0 I get this error, and therefor cannot update.

I only get this error when I use Monaco in an Electron environment and with Node require. The web version works fine.

Actual (Problematic) Behavior

Uncaught TypeError: globalDefine is not a function
    at Object.<anonymous> (editor.main.js:5:395)
    at r._createAndEvalScript (/Users/holger/Desktop/X_ITE/sunrize/node_modules/monaco-editor/min/vs/loader.js:7:2506)
    at /Users/holger/Desktop/X_ITE/sunrize/node_modules/monaco-editor/min/vs/loader.js:7:2147
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read/context:68:3)

Expected Behavior

No response

Additional Context

No response

create3000 avatar Sep 24 '24 12:09 create3000

Me too.

a10036gt avatar Oct 06 '24 08:10 a10036gt

Same issue. Had to roll back to 0.50.0 to make it work at all in Node/Electron.

nuclearsecrecy avatar Oct 07 '24 21:10 nuclearsecrecy

same error

LlanosLautaro avatar Nov 17 '24 17:11 LlanosLautaro

same

00jeser avatar Nov 26 '24 11:11 00jeser