当Firebase Deploy出现问题时,请查看npm run build错误

假设已经通过 firebase init 等方式完成了 Firebase 的设置。

部署 Firebase,仅部署静态托管功能。

在运行时,部署未能完成的原因通常是由于 npm run build 失败所致。
例如,通常可以通过删除 src 目录中的动态文件,并将编译为静态文件的 js 文件编译到 dist 目录中来解决这个问题(如果错误内容如下,则建议先完全删除 src/layouts/dashboard/mobile-nav/dist 目录,然后执行 firebase deploy)。

116:19  Error: React Hook "useCssVars" is called in function "exports.MobileNav" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".  react-hooks/rules-of-hooks```
广告
将在 10 秒后关闭
bannerAds