expecting I wanted to include react-admin in a Gatsby project so that I could have a /admin route that will be an interface for the site data.
What happened instead: Using gatbsy new , I setup a boilerplate gatsby project. Then installing react-admin and adding a page into the gatsby project, while following react-admin tutorial, causes gatsby to fail building.
gatsby develop
seems fine and does not crash the app, however
gatbsy build
leads to
WebpackError: Invariant failed
Steps to reproduce: gatsby new _____ npm install react-admin npm install ra-data-simple-rest
- add a minimal admin page to gatsby's pages folder
gatsby develop = OK gatsby build = Failed
terminal output https://imgur.com/6M6XtME
Related code: Here is a repository that can be cloned to reproduce: https://github.com/jzohdi/react-admin-gatsby-test
Environment Same result on Windows 10 and WSL Ubuntu 18.04
from package.json "gatsby": "^2.22.15", "gatsby-image": "^2.4.5", "gatsby-plugin-manifest": "^2.4.9", "gatsby-plugin-offline": "^3.2.7", "gatsby-plugin-react-helmet": "^3.3.2", "gatsby-plugin-sharp": "^2.6.9", "gatsby-source-filesystem": "^2.3.8", "gatsby-transformer-sharp": "^2.5.3", "prop-types": "^15.7.2", "react": "^16.12.0", "react-admin": "^3.5.5", "react-dom": "^16.12.0", "react-helmet": "^6.0.0"