ithaka / pharos

JSTOR's design system
https://pharos.jstor.org
MIT License
113 stars 15 forks source link

Site: Fix development environment #632

Open satya-achanta-venkata opened 9 months ago

satya-achanta-venkata commented 9 months ago

Expected behavior Running yarn site:develop should run pharos site successfully locally

Actual behavior Locally, I am seeing blank page and console errors after running yarn site:develop. (More in Additional Information)

Steps to reproduce the issue

  1. On develop branch, run yarn site:develop
  2. Gatsby service with pharos site docs, should be running on http://localhost:8000
  3. Visiting, http://localhost:8000 displaying blank page and having above mentioned console error (from Actual Behavior)

Screenshots or code If applicable, add screenshots or code to help explain the issue.

Pharos version pharos site: 5.13.4

Your environment

Additional information

After running yarn site:develop, I see blank page with below console error:
Uncaught Error: ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ../../node_modules/gatsby-plugin-mdx/loaders/mdx-components.js.

Also, I see this warn message during build process: warn ../../node_modules/gatsby-plugin-mdx/wrap-root-element.js Attempted import error: 'plugins' is not exported from './loaders/mdx-components' (imported as 'mdxPlugins').

daneah commented 3 months ago

I believe this is because of the current version of gatsby-plugin-mdx, which we can resolve by: