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
When you visit localhost you will be greeted with a similar error
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/stevebister/SITES/osc-sanity-remix/node_modules/@mdx-js/react/index.js from /Users/stevebister/SITES/osc-sanity-remix/node_modules/@theme-ui/mdx/dist/theme-ui-mdx.cjs.dev.js not supported.
Instead change the require of index.js in /Users/stevebister/SITES/osc-sanity-remix/node_modules/@theme-ui/mdx/dist/theme-ui-mdx.cjs.dev.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/Users/stevebister/SITES/osc-sanity-remix/node_modules/@theme-ui/mdx/dist/theme-ui-mdx.cjs.dev.js:8:13)
at Object.<anonymous> (/Users/stevebister/SITES/osc-sanity-remix/node_modules/@theme-ui/mdx/dist/theme-ui-mdx.cjs.js:6:20)
at Object.<anonymous> (/Users/stevebister/SITES/osc-sanity-remix/node_modules/theme-ui/dist/theme-ui.cjs.dev.js:7:11)
at Object.<anonymous> (/Users/stevebister/SITES/osc-sanity-remix/node_modules/theme-ui/dist/theme-ui.cjs.js:6:20)
at Object.<anonymous> (/Users/stevebister/SITES/osc-sanity-remix/node_modules/sanity-plugin-media/lib/cjs/index.js:10:22)
at Object.<anonymous> (/Users/stevebister/SITES/osc-sanity-remix/build/index.js:1522:165)
at /Users/stevebister/SITES/osc-sanity-remix/node_modules/@remix-run/serve/dist/index.js:43:17
at Layer.handle [as handle_request] (/Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/layer.js:95:5)
at next (/Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/route.js:144:13)
at next (/Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/route.js:138:14)
at next (/Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/route.js:138:14)
at next (/Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/route.js:138:14)
at next (/Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/route.js:138:14)
at next (/Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/route.js:138:14)
at next (/Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/route.js:138:14)
at Route.dispatch (/Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/route.js:114:3)
at Layer.handle [as handle_request] (/Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/layer.js:95:5)
at /Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/index.js:284:15
at param (/Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/index.js:365:14)
at param (/Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/index.js:376:14)
at Function.process_params (/Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/index.js:421:3)
at next (/Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/index.js:280:10)
at logger (/Users/stevebister/SITES/osc-sanity-remix/node_modules/morgan/index.js:144:5)
at Layer.handle [as handle_request] (/Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/index.js:328:13)
at /Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/index.js:286:9
at Function.process_params (/Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/index.js:346:12)
at next (/Users/stevebister/SITES/osc-sanity-remix/node_modules/express/lib/router/index.js:280:10)
at SendStream.error (/Users/stevebister/SITES/osc-sanity-remix/node_modules/serve-static/index.js:121:7)
at SendStream.emit (node:events:527:28)
at SendStream.error (/Users/stevebister/SITES/osc-sanity-remix/node_modules/send/index.js:270:17)
at SendStream.onStatError (/Users/stevebister/SITES/osc-sanity-remix/node_modules/send/index.js:417:12)
at next (/Users/stevebister/SITES/osc-sanity-remix/node_modules/send/index.js:759:28)
at /Users/stevebister/SITES/osc-sanity-remix/node_modules/send/index.js:767:23
at FSReqCallback.oncomplete (node:fs:198:21)
Release Version
1.0.0
Browser
No response
Operating System
macOS
Windows
Linux
Additional Information
This appears to be an issue with Remix not liking the ES module in @theme-ui/mdx which is a dependency of sanity-plugin-media and doesn't seem to play nice with Remix
The text was updated successfully, but these errors were encountered:
Add "postinstall": "patch-package" to the package.json
Run npm i patch-package --save-dev
Add COPY patches/@theme-ui+mdx+0.14.7.patch /myapp/patches/@theme-ui+mdx+0.14.7.patch to each Dockerfile to ensure the patch file gets included in the CI build
Description
When installing
sanity-plugin-media
an error get's thrown by RemixLink to Reproduction
http://localhost:3000
Steps to reproduce
Install the
sanity-plugin-media
https://github.com/robinpyon/sanity-plugin-media/tree/v3-studio
Import and add the plugin to your
sanity.config.ts
fileRun
When you visit localhost you will be greeted with a similar error
Release Version
1.0.0
Browser
No response
Operating System
Additional Information
This appears to be an issue with Remix not liking the ES module in
@theme-ui/mdx
which is a dependency ofsanity-plugin-media
and doesn't seem to play nice with RemixThe text was updated successfully, but these errors were encountered: