简体   繁体   中英

react-snap: getting "processGoogleToken is not defined" error

I'm trying to populate static pages from a react app using react-snap and I keep getting this error on every page.

I don't find anything online on this error, same with "VM1516 integrator.js".

Any idea what's causing this?

处理 Google 令牌错误

If you add to your package.json file it will stop google adsense/analytics from loading. Warnings about failed network requests will show instead of the error.

  "reactSnap": {
    "skipThirdPartyRequests": true
  }

The other option is you can dynamically load the google script based on the user agent.

  if (navigator.userAgent !== "ReactSnap") {
    // some code to dynamically load a script
  }

It seems you are using Google Analytics and/or Google Adsense scripts.

react-snap executed them locally and put the partial response into the snapshots :(

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM