This may not solve your problem directly however I've encountered a similar problem with react-markdown package. My app worked fine on my Windows PC, in a dev container with Ubuntu and Azure App Service on Linux, however when I've migrated the app to a different host which uses DirectAdmin with CloudLinux Node.js Selector pages which had a reference to react-markdown would produce a 500 error and the same "Error: open EEXIST" error in the log.
I think it might have something to do with the dependencies of both of the react-markdown and next-mdx-remote packages, currently I am looking for an alternative to react-markdown which will hopefully work on my server setup.