This is happening in a react project using webpack. The project is created using create-react-app
After a lot of debugging, I have found the cause of the error to be in the following file.
It happens in the function below:
function getEditorMetadata(monacoEditorPath: string | undefined): EditorMetadata {
const metadataPath = resolveMonacoPath('metadata.js', monacoEditorPath);
return require(metadataPath);
}
Line no: 58
But I'm not sure from where that file should come from. I have googled it but seems like there are no traces of this error to be found.
Appreciate your help on this.