-
Notifications
You must be signed in to change notification settings - Fork 405
Cannot build on server - "gatsby-plugin-mdx" threw an error while running the createSchemaCustomization #217
Replies: 1 comment · 4 replies
-
I use these versions, same on server and local: This issue talk about similar issue with another plugin together with "gatsby-plugin-mdx" but their solution was to upgrade the plugins and I already have higher version than they recommend. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Since it works locally but fails on the server, I can only assume that your NodeJS/Yarn/npm versions on the server are what's causing the issue. I'd say try upgrading them via
Yes. That's the line where the plugin is loaded. But the error comes from the plugin itself not the configuration. |
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Thank you for the advice @Vagr9K, I checked the versions and they are very similar. I did try to install same versions as I have local (local-1) on the server, but I still get the same error. Server Local-1 Local-2 Server after change: After changing versions of node and npm, I removed the node_modules folder and run yarn install, then yarn develop. Yes I agree that the error is not in the configuration file, but I just thought it might be related to the plugin order or that the plugins that are used together with the "gatsby-plugin-mdx" might affect the plugin, that's why I included the file in the comment. I dont think the issue is with the versions of NodeJS, Yarn or npm. Here's the full error message, I dont know if something further down might give a clue.
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Hmm. Strange. Haven't had an issue like this on my end. I guess as a workaround you can build locally and deploy on the server until this gets fixed on |
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Killing my droplet and making a new one magically solved it. But I tried for 2 days and several hours of attempts of reinstalling before, so weird... |
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
I get this error when building this starter kit on a server for production, I have tested the code on 3 different computers and it works locally on MacOS and Windows, however when on the server (Ubuntu) I cannot neither do yarn build or yarn develop.
Im using:
[email protected]
Gatsby CLI version: 3.13.0
Gatsby version: 4.2.0
Same versions locally, macOs, as on server Ubuntu.
I suspect the error comes from this file https://github.com/Vagr9K/gatsby-advanced-starter/blob/master/themes/advanced/gatsby/gatsby-config.ts at line 95
Has anyone encountered the same error or any idea on how to solve it?
Beta Was this translation helpful? Give feedback.
All reactions