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

Issue with Fetch as Google? Robots? #3126

Closed
1 task done
mattjstar opened this issue Oct 18, 2017 · 8 comments
Closed
1 task done

Issue with Fetch as Google? Robots? #3126

mattjstar opened this issue Oct 18, 2017 · 8 comments

Comments

@mattjstar
Copy link

mattjstar commented Oct 18, 2017

  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Current Behavior

I'm struggling to figure out how to duplicate this locally, but I was using 3.0.0-beta9 and upgraded to 4.1 (including upgrading to react 16) and now I get this when I use fetch as google or google's page speed test. I narrowed it down to happening sometime between the 3.0 beta and upgrading to next 3.2.1
screen shot 2017-10-18 at 3 01 43 pm

I'm worried that it's causing SEO issues. Has anyone else run into this issue?

Steps to Reproduce (for bugs)

  1. Deploy a next site to Netlify at > 3.2.1
  2. Test that site on Google Page Speed insights tool

Context

Your Environment

Tech Version
next 3.2.1
node 8.4.0
OS 10.12.6
browser chrome
etc
@mattjstar
Copy link
Author

FYI, I was able to confirm it's still an issue in 3.0.2

@mattjstar
Copy link
Author

Hmm, this could be related styled-components/styled-components#1033

@mattjstar
Copy link
Author

Ignore! There was an issue with how we were loading postcss in our specific app. Apologies for making it an issue. Carry on with the good work!

@timneutkens
Copy link
Member

❤️ No worries!

@mattjstar
Copy link
Author

mattjstar commented Oct 19, 2017

hmm, this actually might still be an issue.

When I use a custom _document.js file and remove <NextScript/> it loads properly in fetch as google. Unfortunately, that defeats the purpose of using Next as none of the JS loads. I'm gonna keep digging into the NextScript component to see if I can find anything.

@mattjstar mattjstar reopened this Oct 19, 2017
@iamsoorena
Copy link

I think the problem relies on using strip-ansi package in next js. since strip-ansi uses arrow functions and google uses chrome 41 for crawling websites which doesn't support arrow functions and results in errors.
check this.

@mattjstar
Copy link
Author

Ah thanks for connecting me to that issue @iamsoorena I'll close this in favor of #2747

i8ramin added a commit to i8ramin/next.js that referenced this issue Dec 6, 2017
timneutkens pushed a commit that referenced this issue Dec 8, 2017
timneutkens pushed a commit that referenced this issue Dec 8, 2017
A few discussions:
#2747
#3126
# Conflicts:
#	package.json
@i8ramin
Copy link
Contributor

i8ramin commented Dec 11, 2017

What I had to do to finally make it all work:
#3205 (comment)

@lock lock bot locked as resolved and limited conversation to collaborators Dec 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants