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
{{ message }}
Repository navigation
[Bug] Monaco Editor always set up Native environment instead of Web environment on load. #4402
Hello, my application is broken after updating to version 0.46.0. I found the problem in platform.js always setup Native environment and attempt to get the value of undefinednodeProcess.env although I use monaco-editor with web environment (See attachment below)
Has anyone encountered a similar issue or found any solutions for this problem?
Thanks.
Expected Behavior
Please proceed to check as in version 0.45.0, where the web environment will be prioritized for examination first, or check if the value of nodeProcess.env is different from null and undefined.
Facing the same issue, only solution for me is, to switch back to version 0.45.0.
I am using webpack (with monaco-editor-webpack-plugin) to build web app and have to provide/polyfill "process" for another library. This messes up the platform detection & break clipboard paste functionality.
Activity
jkorrek commentedon Feb 29, 2024
Facing the same issue, only solution for me is, to switch back to version 0.45.0.
I am using webpack (with monaco-editor-webpack-plugin) to build web app and have to provide/polyfill "process" for another library. This messes up the platform detection & break clipboard paste functionality.
j4k0xb commentedon Mar 7, 2024
Same issue here, it was introduced in microsoft/vscode#200935
it's also often polyfilled:

kkocdko (@kkocdko) could you please test if that works as expected in node/electron/browsers and make a new PR?
[Bug] Monaco Editor always set up Native environment instead of Web e…
vscode: [Bug] Monaco Editor always set up Native environment instead …
TylerLeonhardt commentedon Mar 27, 2024
Benjamin Pasero (@bpasero) can you provide some verification steps
DanielRose commentedon Apr 4, 2024
This is still broken in 0.47.0. Verification has already been described:
plugins: [ new webpack.ProvidePlugin({ process: 'process/browser' }) ]Clipboard copy/paste does not work as long as the polyfill exists.
The linked commit would fix the issue, but it is not part of the 0.47.0 release.
j4k0xb commentedon Apr 4, 2024
afaik monaco uses the latest vscode release, gotta wait for the next one
or use the 0.48.0-dev versions for now
DanielRose commentedon May 22, 2024
This bug was fixed, as least in our case, in 0.48.0