部署 gatsby (v2) 来消除错误

deploying gatsby (v2) to netlify errors

我在部署到 netlify 时遇到了一些问题。这些是我收到的错误:

Error: ./src/pages/index.js 12:55:30 PM: Module not found: Error: Can't resolve '../components/Featured' in '/opt/build /repo/src/pages' 12:55:30 PM: resolve '../components/Featured' in '/opt/build/repo/src/pages' 12:55:30 PM: using description file: /opt/build/repo/package.json (relative path: ./src/p ages) 12:55:30 PM: Field 'browser' doesn't contain a valid alias configuration

由于某种原因,它找不到组件。本地建设工作正常。

我使用了带有样式组件的 gatsby-starter。

我尝试过的事情: 我有一些关于 window 未定义的本地构建错误。我通过有条件地将它们包含为 the manual proposes.

来修复它们

应用这个之后,我开始从“workbox”接收控制台日志。

(顺便说一句,这是我第一次尝试部署到 netlify) 错误 Field 'browser' doesn't contain a valid alias configuration 也在日志中不断重复

here's a link to the full log 我从 netlify

错误是由于 webpack 无法解析您的相对路径。确保使用正确的大小写。

import Hero from '../components/hero'
import Introduce from '../components/introduce'
import HelpMeHelpYou from '../components/helpmehelpyou'
import Featured from '../components/featured'
import Testimonials from '../components/testimonials'
import Projects from '../components/projects'
import Gallery from '../components/gallery'
import Outroduce from '../components/outroduce'

运行 下面的命令,然后将代码推送到 Github 存储库。

git config core.ignorecase false