Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin breaks gatsby develop #5

Open
Slind14 opened this issue Mar 18, 2020 · 6 comments
Open

Plugin breaks gatsby develop #5

Slind14 opened this issue Mar 18, 2020 · 6 comments

Comments

@Slind14
Copy link

Slind14 commented Mar 18, 2020

When the plugin is active the gatsby develop command doesn't work anymore. It throws this error:

     |   if (process.env.NODE_ENV !== "production") {
> 16 |     reporter.warn("non production environment");
     |              ^
  17 |     return null;
  18 |   }


WebpackError: TypeError: Cannot read property 'warn' of undefined

Although there is jest in the package.json.

@carlosstenzel
Copy link

All you have to do is place the following AdSense code in html.js.

<script data-ad-client="ca-pub-8888613999935794" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

@Slind14
Copy link
Author

Slind14 commented Apr 6, 2020

We did that. Not using the plugin anymore

@mcmxcdev
Copy link

mcmxcdev commented May 7, 2020

I am running into the same issue, any solution to this?

@carlosstenzel
Copy link

@mcmxcdev
Copy link

mcmxcdev commented May 8, 2020

@carlosstenzel Thank you, got it working now! So I put the code in manually in html.js, that makes the actual plugin useless, right?

@carlosstenzel
Copy link

@carlosstenzel Thank you, got it working now! So I put the code in manually in html.js, that makes the actual plugin useless, right?

Right.

Now remove the plugin from your application 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants