microsoft / microsoft/monaco-editor
[Bug] globalDefine is not a function
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
Reproducible in vscode.dev or in VS Code Desktop?
- Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- Not 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure in an Electron environment using Node require, then inspect editor.main.js and the loader.js stack-trace locations in monaco-editor/min/vs/loader.js. Done means Monaco loads without the globalDefine TypeError in that environment while the web version continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, javascript, node.js
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100