-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Uncaught TypeError: t.replace is not a function (A page wasn't found for "[object Object]") #4067
Comments
Can you recreate the issue on a local build of the site? e.g. if you do |
Hi @m-allanson , |
Hmm. As a baseline try deleting your Your error is coming from Alternatively if you can post an example repo I can have a look? |
I wonder if it's related to this? #3407 |
I had the same issue but it resolved when I updated Gatsby from ^1.9.102 to 1.9.203. |
I'm currently getting this issue only in production. Not when I build and serve locally. I have deleted my node_modules, .cache and public folders. Gatsby: 1.9.238 |
@fpoumian did you find a fix for this? |
Hey guys, it seems like a gatsby-link related issue. We were using 1.6.34, upgraded to 1.6.39 and encountered with this problem. Downgrading to 1.6.34 resolved. I think there's an argument mismatch on the function chain triggered by react-router -> gatsby-link -> loader.js |
@altayaydemir This didn't seem to work for me. Here's my update: This downgrade did work. I was still using ^1.6.39 in my |
@KyleAMathews Looks like the update to allow an object for "to" prop in #3407 correctly updated the production only block on Line 142 to only send the path/pathname But was then reverted back to passing the whole state with this update for adding to history #3802 which seems to be what is causing the loader.js to throw this log error only in built versions |
Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help! |
Description
I'm getting the following browser error on a production site generated by Gatsby.
The error doesn't show up when the page first loads, but it does whenever I click on any of the internal links (all of which use Gatsby Link). This in turn causes the site to react way slower when navigating the site. Oddly enough I don't have this problem during development (the Links work as intended there), but only in the production site itself.
I have worked in a couple of Gatsby sites already and never had this problem before, so I have no idea what I'm doing wrong this time.
Environment
Gatsby version: 1.9.158
Node.js version: 8.9.3
Operating System: Ubuntu 16.04
Actual result
Whenever I click on any of the links the previously described error pops up and the site takes way longer to load the new page.
Expected behavior
The site should navigate to the linked route quickly and without any errors (just as it does in the development site.)
...
The text was updated successfully, but these errors were encountered: