Uncaught TypeError: require2 is not a function #4085
Replies: 1 comment 1 reply
-
I got to fix it. Just including
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. I'm trying to use monaco with electron and the WebpackPlugin.
However, Looking into 'ts.worker.js' compiled file there is a
require2
which is assigned as undefined:I think that's the cause of
![Screenshot from 2023-07-18 05-01-55](https://private-user-images.githubusercontent.com/3027489/254189349-58c603f5-a10b-4cc0-b2d4-37e65ea6471a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg5NjE4NjYsIm5iZiI6MTcxODk2MTU2NiwicGF0aCI6Ii8zMDI3NDg5LzI1NDE4OTM0OS01OGM2MDNmNS1hMTBiLTRjYzAtYjJkNC0zN2U2NWVhNjQ3MWEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjFUMDkxOTI2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZWIxZjk1Mjg5NDAxMDJmYjJmYjJlNGZiMmUxZmIzYmFmZmY1M2YzNGUwYWJiMzMyODA4NDRkN2U5ZGJhYWM2YyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.wXKDf23wIBjPW6RqQhHbg_tDn7QmxLY12VUsArs8LV8)
Looking into the whole file, it only seems to have one assignment to this var, however that
void 0
does not seems correct.I saw many people with this unexpected usage cause by a missed definition of the getWorkerUrl, however this seems to be working:
Beta Was this translation helpful? Give feedback.
All reactions