【发布时间】:2021-08-20 21:12:46
【问题描述】:
我正在尝试部署 Docusaurus v2,但我不断收到此错误:
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
我在一个团队中工作,每个人都在同一个 repo 上工作,deploy 似乎适用于大多数人。错误解码器链接表明它可能是:
- React 和 React-dom 的版本不匹配。
- 打破挂钩规则。
- 在同一个应用程序中有多个 React 副本。
我尝试更新所有内容,包括 React 和 react-dom。
我看不出它怎么可能是 2 或 3,因为它适用于大多数人。一切都在本地运行良好。有什么建议可以尝试部署吗?
【问题讨论】:
标签: node.js reactjs npm docusaurus