I am trying to deploy Docusaurus v2 and I keep getting this error:
Creating an optimized production build...
√ Client
Compiled successfully in 18.44s
× Server
Compiled with some errors in 20.74s
Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
...
...
...
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! website@0.0.0 deploy: `docusaurus deploy`
npm ERR! Exit status 1
I am working in a team, everyone is working off the same repo, and deploy
seems to work for most people. The error-decoder link suggests it could be:
- Mismatching versions of React and React-dom.
- Breaking the Rules of Hooks.
- More than one copy of React in the same app.
I tried updating everything including React and react-dom.
I don't see how it could be 2 or 3 given it works for most people. Everything runs fine locally. Any suggestions on what to try in order to deploy?