安装gatsby-source-googlemaps-static后没有GraphQL字段

问题描述

我正尝试将gatsby-source-googlemaps-static用于盖茨比。

我已经安装了插件,并使用Googs设置了API密钥,并为我的密钥和配置设置了.env文件

//.env.development

GOOGLE_MAPS_KEY='xxxxxxxxxxxxxxMYKEYzzzzzzzzzzzzzzzzzzy'

我的gatsby-config

require('dotenv').config({
    path: `.env.${process.env.NODE_ENV}`,})

module.exports = {
    plugins: [
        {
            resolve: `gatsby-source-googlemaps-static`,options: {
                key: process.env.GOOGLE_MAPS_KEY,center: `48.461470,-123.297833`
            },}
    ]
}

在开发中运行时,我得到以下信息

ERROR #11329

Your plugins must export kNown APIs from their gatsby-node.js.

See https://www.gatsbyjs.org/docs/node-apis/ for the list of Gatsby node APIs.

- The plugin gatsby-plugin-sharp@2.6.40 is using the API "pluginoptionsSchema" which is not available in your version of Gatsby.

success load plugins - 1.347s
success onPreInit - 0.025s
info One or more of your plugins have changed since the last time you ran Gatsby. As
a precaution,we're deleting your site's cache to ensure there's no stale data.
success initialize cache - 0.033s
success copy gatsby files - 0.076s
success onPreBootstrap - 0.015s
success createSchemaCustomization - 0.005s

 ERROR #11321  PLUGIN

"gatsby-source-googlemaps-static" threw an error while running the sourceNodes lifecycle:

Request Failed with status code 403

因此,我从googlemaps-static插件获取了403禁止,并且显然它请求的API不属于Gatsby的一部分,所以我错过了一些东西吗?或者该插件与Gatsby的版本不兼容吗?使用吗?

这就是我正在使用的东西:

System:
    OS: Windows 10 10.0.18362
    cpu: (8) x64 Intel(R) Core(TM) i5-8300H cpu @ 2.30GHz
  Binaries:
    Node: 12.16.1 - C:\Program Files\nodejs\node.EXE
    npm: 6.13.4 - C:\Program Files\nodejs\npm.CMD
  browsers:
    Edge: 44.18362.449.0
  npmPackages:
    gatsby: ^2.24.67 => 2.24.67
    gatsby-image: ^2.4.21 => 2.4.21
    gatsby-plugin-google-fonts: ^1.0.1 => 1.0.1
    gatsby-plugin-sass: ^2.3.16 => 2.3.16
    gatsby-plugin-sharp: ^2.6.40 => 2.6.40
    gatsby-source-filesystem: ^2.3.34 => 2.3.34
    gatsby-source-googlemaps-static: ^1.1.12 => 1.1.12
    gatsby-transformer-sharp: ^2.5.17 => 2.5.17

谢谢。


更新

自从我得知这个插件@ccalamos/gatsby-source-googlemaps-static似乎是活动插件后,却在运行gatsby develop时遇到以下错误

warn Plugin @ccalamos/gatsby-source-googlemaps-static is not compatible with your gatsby version
success open and validate gatsby-configs - 0.033s
warn Plugin @ccalamos/gatsby-source-googlemaps-static is not compatible with your gatsby version

 ERROR #11329

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...