如何以重现Live网站404错误的方式运行Gatsby网站?
我有一个盖茨比网站,该网站在Live运行时会在Chrome Devtools中丢下404个错误。当我使用 npm运行开发
本地运行时,我看不到错误。有没有办法以模仿实时网站的方式在本地运行该站点,以便我更有可能看到404错误?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
刚运行:
总结
,
gatsby build
将编译您的应用程序并准备好部署,而gatsby serve
将为您的网站生产构建用于测试,默认情况下是在端口上9000
。有关
gatsby-cli
命令的更多详细信息:Just run:
And
Summarizing,
gatsby build
will compile your application and make it ready for deployment whilegatsby serve
will serve the production build of your site for testing, by default at port9000
.More details about
gatsby-cli
commands at: https://www.gatsbyjs.com/docs/reference/gatsby-cli/