Kornil / gatsby-plugin-google-analytics-reporter

Query pageviews from google analytics using google reporting API v4
3 stars 3 forks source link

Plugin is not working #10

Open iloveip opened 2 years ago

iloveip commented 2 years ago

Hi there,

I installed the plugin, but it's not working. I get the following error when running gatsby develop:

 ERROR #11321  PLUGIN

"gatsby-plugin-google-analytics-reporter" threw an error while running the
sourceNodes lifecycle:

error:0909006C:PEM routines:get_name:no start line

  14 |     scopes
  15 |   );
> 16 |   await jwt.authorize();
     |             ^
  17 |
  18 |   const analyticsReporting = google.analyticsreporting({
  19 |     version: 'v4',

File: node_modules/gatsby-plugin-google-analytics-reporter/gatsby-node.js:16:13

  Error: error:0909006C:PEM routines:get_name:no start line

  - sig:131 Sign.sign
    node:internal/crypto/sig:131:29

  - index.js:152 Object.sign
    [gatsby-site]/[jwa]/index.js:152:45

  - sign-stream.js:32 Object.jwsSign [as sign]
    [gatsby-site]/[jws]/lib/sign-stream.js:32:24

  - index.js:225 GoogleToken.requestToken
    [gatsby-site]/[gtoken]/build/src/index.js:225:31

  - index.js:163 GoogleToken.getTokenAsyncInner
    [gatsby-site]/[gtoken]/build/src/index.js:163:21

  - index.js:142 GoogleToken.getTokenAsync
    [gatsby-site]/[gtoken]/build/src/index.js:142:55

  - index.js:94 GoogleToken.getToken
    [gatsby-site]/[gtoken]/build/src/index.js:94:21

  - jwtclient.js:158 JWT.refreshTokenNoCache
    [gatsby-site]/[google-auth-library]/build/src/auth/jwtclient.js:158:36

  - oauth2client.js:143 JWT.refreshToken
    [gatsby-site]/[google-auth-library]/build/src/auth/oauth2client.js:143:25

  - jwtclient.js:139 JWT.authorizeAsync
    [gatsby-site]/[google-auth-library]/build/src/auth/jwtclient.js:139:35

  - jwtclient.js:135 JWT.authorize
    [gatsby-site]/[google-auth-library]/build/src/auth/jwtclient.js:135:25

  - gatsby-node.js:16 Object.exports.sourceNodes
    [gatsby-site]/[gatsby-plugin-google-analytics-reporter]/gatsby-node.js:16:13

  - api-runner-node.js:487 runAPI
    [gatsby-site]/[gatsby]/src/utils/api-runner-node.js:487:22

  - api-runner-node.js:638 Promise.catch.decorateEvent.pluginName
    [gatsby-site]/[gatsby]/src/utils/api-runner-node.js:638:13

  - debuggability.js:384 Promise._execute
    [gatsby-site]/[bluebird]/js/release/debuggability.js:384:9

  - promise.js:518 Promise._resolveFromExecutor
    [gatsby-site]/[bluebird]/js/release/promise.js:518:18

warn The gatsby-plugin-google-analytics-reporter plugin has generated no Gatsby
nodes. Do you need it? This could also suggest the plugin is misconfigured.

How can I fix that?

Kornil commented 1 year ago

Hi @iloveip could you provide an example where this is reproducible?