Reactjs 如何在Netlify上发布带有盖茨比图像的盖茨比项目?

Reactjs 如何在Netlify上发布带有盖茨比图像的盖茨比项目?,reactjs,graphql,gatsby,netlify,gatsby-image,Reactjs,Graphql,Gatsby,Netlify,Gatsby Image,所以我可以在本地构建我的盖茨比项目没有问题,但是当Netlify尝试构建时,我得到了错误 Field "featuredImage" must not have a selection since type "String" has no subfields. 5:34:38 PM: This can happen if you e.g. accidentally added { } to the field "featuredImage". If you didn't expect "feat

所以我可以在本地构建我的盖茨比项目没有问题,但是当Netlify尝试构建时,我得到了错误

Field "featuredImage" must not have a selection since type "String" has no subfields.
5:34:38 PM: This can happen if you e.g. accidentally added { } to the field "featuredImage". If you didn't expect "featuredImage" to be of type "String" make sure that your input source and/or plugin is correct.
5:34:38 PM: error There was an error in your GraphQL query:
5:34:38 PM: Field "featuredImage" must not have a selection since type "String" has no subfields.
5:34:38 PM: This can happen if you e.g. accidentally added { } to the field "featuredImage". If you didn't expect "featuredImage" to be of type "String" make sure that your input source and/or plugin is correct.
5:34:38 PM: error There was an error in your GraphQL query:
5:34:38 PM: Field "featuredImage" must not have a selection since type "String" has no subfields.
5:34:38 PM: This can happen if you e.g. accidentally added { } to the field "featuredImage". If you didn't expect "featuredImage" to be of type "String" make sure that your input source and/or plugin is correct.
5:34:38 PM: failed extract queries from components - 0.439s
这基本上只是告诉我,我需要在生产模式下构建,以查看完整的错误,对吗?生产模式很好,因为这在我的本地计算机上

我正在使用
gatsby图像
gatsby背景图像
,我听说这可能会导致问题?我尝试添加并跟踪帖子,但仍然得到相同的错误


我还为node版本添加了一个环境变量,该变量不起任何作用,但我了解到它可能对Netlify和Gatsby有用


这是Netlify给我的整个控制台日志

5:33:23下午:构建准备开始
下午5:33:25:生成映像版本:30f629161c0736b1a3ecd8b418e5eeffab5c0faf
下午5:33:25:构建映像标记:v3.3.14
下午5:33:25:buildbot版本:c59536cd5af8d84bd2f02c6af4027561b250018a
下午5:33:25:获取缓存的依赖项
下午5:33:25:开始下载254.9KB的缓存
下午5:33:25:在71.841033ms内完成下载缓存
下午5:33:25:开始提取缓存
下午5:33:25:无法获取缓存,继续生成
下午5:33:25:开始准备回购以供构建
下午5:33:25:未找到缓存的依赖项。克隆新回购协议
下午5:33:25:git克隆https://github.com/samgermain/sudSaskV2
下午5:33:28:准备Git参考参考文献/头/母版
下午5:33:28:开始生成脚本
下午5:33:28:安装依赖项
下午5:33:29:下载并安装节点v14.3.0。。。
下午5:33:30:下载https://nodejs.org/dist/v14.3.0/node-v14.3.0-linux-x64.tar.xz...
下午5:33:30:使用sha256sum计算校验和
下午5:33:30:校验和匹配!
下午5:33:33:现在正在使用节点v14.3.0(npm v6.14.5)
下午5:33:33:开始恢复缓存的生成插件
下午5:33:33:已完成恢复缓存的生成插件
下午5:33:34:正在尝试从环境读取ruby 2.6.2版
下午5:33:35:使用ruby 2.6.2版
下午5:33:35:使用PHP 5.6版
下午5:33:35:5.2已安装。
下午5:33:35:使用Swift版本5.2
下午5:33:35:已开始还原缓存的节点模块
下午5:33:35:已完成恢复缓存的节点模块
下午5:33:35:使用NPM版本6.14.5安装NPM模块
下午5:34:18:>sharp@0.25.3安装/opt/build/repo/node_模块/sharp
下午5:34:18:>(节点安装/libvips&&node安装/dll复制和预构建安装--runtime=napi)| |(节点gyp重建和节点安装/dll复制)
下午5:34:19:信息
下午5:34:19:整
下午5:34:19:下载https://github.com/lovell/sharp-libvips/releases/download/v8.9.1/libvips-8.9.1-linux-x64.tar.gz
下午5:34:21:>节点-sass@4.14.1安装/opt/build/repo/node_模块/node sass
下午5:34:21:>节点脚本/install.js
下午5:34:21:从下载二进制文件https://github.com/sass/node-sass/releases/download/v4.14.1/linux-x64-83_binding.node
下午5:34:22:下载完成
下午5:34:22:二进制文件保存到/opt/build/repo/node_modules/node sass/vendor/linux-x64-83/binding.node
下午5:34:22:将二进制文件缓存到/opt/buildhome/.npm/node sass/4.14.1/linux-x64-83_binding.node
下午5:34:22:>核心-js@2.6.11postinstall/opt/build/repo/node_modules/@babel/polyfill/node_modules/core js
下午5:34:22:>node-e“try{require('./postinstall')}catch(e){}”
下午5:34:22:感谢您使用core js(https://github.com/zloirock/core-js )用于填充JavaScript标准库!
下午5:34:22:项目需要你的帮助!请考虑支持开放式集体或Patreon的核心JS:
下午5:34:22:>https://opencollective.com/core-js 
下午5:34:22:>https://www.patreon.com/zloirock 
下午5:34:22:另外,core js(https://github.com/zloirock )正在找一份好工作——)
下午5:34:22:>核心-js@2.6.11postinstall/opt/build/repo/node_modules/babel polyfill/node_modules/core js
下午5:34:22:>node-e“try{require('./postinstall')}catch(e){}”
下午5:34:22:>核心-js@2.6.11postinstall/opt/build/repo/node_modules/babel runtime/node_modules/core js
下午5:34:22:>node-e“try{require('./postinstall')}catch(e){}”
下午5:34:22:>核心-js@3.6.5postinstall/opt/build/repo/node_modules/core js
下午5:34:22:>node-e“try{require('./postinstall')}catch(e){}”
下午5:34:22:>核心js-pure@3.6.5postinstall/opt/build/repo/node_modules/core js pure
下午5:34:22:>node-e“try{require('./postinstall')}catch(e){}”
下午5:34:23:>核心-js@2.6.11postinstall/opt/build/repo/node_modules/gatsby/node_modules/core js
下午5:34:23:>node-e“try{require('./postinstall')}catch(e){}”
下午5:34:24:>盖茨比-telemetry@1.3.9安装后/opt/build/repo/node_模块/gatsby遥测
下午5:34:24:>节点src/postinstall.js | | true
下午5:34:24:>cwebp-bin@5.1.0安装后/opt/build/repo/node_模块/cwebp bin
下午5:34:24:>节点lib/install.js
下午5:34:25:✔ cwebp预构建测试成功通过
下午5:34:25:>mozjpeg@6.0.1postinstall/opt/build/repo/node_modules/mozjpeg
下午5:34:25:>节点lib/install.js
下午5:34:25:✔ mozjpeg预构建测试成功通过
下午5:34:25:>pngquant-bin@5.0.2安装后/opt/build/repo/node_模块/pngquant bin
下午5:34:25:>节点lib/install.js
下午5:34:26:✔ pngquant预构建测试成功通过
下午5:34:26:>盖茨比-cli@2.12.36安装后/opt/build/repo/node_modules/gatsby/node_modules/gatsby cli
下午5:34:26:>节点脚本/postinstall.js
下午5:34:26:>gatsby@2.22.11安装后/opt/build/repo/node_模块/gatsby
下午5:34:26:>节点脚本/postinstall.js
下午5:34:26:>节点-sass@4.14.1安装后/opt/build/repo/node_模块/node sass
下午5:34:26:>节点脚本/build.js
下午5:34:26:二进制文件位于/opt/build/repo/node_modules/node sass/vendor/linux-x64-83/binding.node
下午5:34:26:正在测试二进制文件
下午5:34:27:双星可以
下午5:34:29:npm警告可选跳过可选依赖项:fsevents@1.2.13(节点\单元模块/fsevents):
下午5:34:29:npm WARN notsup跳过可选依赖项:不支持的平台fsevents@1.2.13:通缉{“os”:“darwin”,“arch”:“any”}(当前:{“os”:“linux”,“arch”:“x64”})
下午5:34:29:npm西
const { fmImagesToRelative } = require('gatsby-remark-relative-images');

exports.onCreateNode = ({ node }) => {
  fmImagesToRelative(node);
};
 // gatsby-source-filesystem options here
 {
    resolve: `gatsby-transformer-remark`,
    options: {
      plugins: [
        // gatsby-remark-relative-images must
        // go before gatsby-remark-images
        {
          resolve: `gatsby-remark-relative-images`,
        },
        {
          resolve: `gatsby-remark-images`,
          options: {
            // It's important to specify the maxWidth (in pixels) of
            // the content container as this plugin uses this as the
            // base for generating different widths of each image.
            maxWidth: 590,
          },
        },
      ],
    },
media_folder: static/assets/images
public_folder: /assets/images