question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect URLs generated when pathPrefix value is set

See original GitHub issue

Overview

Using gatsby v2, I have a site with a value set for the pathPrefix parameter. Before I added this parameter, Both gatsby develop and gatsby build --prefix-paths worked correctly. Now I am seeing 404 errors trying to load icons in both development and when running the site after a build.

Here are example URLs that are trying to be loaded:

http://sites/somename/icons-e09e4c81dabea7f47e8e80e2478342f9/favicon-32x32.png http://sites/somename/icons-e09e4c81dabea7f47e8e80e2478342f9/favicon-16x16.png

Here are examples within the built HTML files:

<link rel="apple-touch-icon" sizes="32x32" href="//sites/somename/icons-e09e4c81dabea7f47e8e80e2478342f9/favicon-32x32.png" /> <link rel="apple-touch-icon" sizes="16x16" href="//sites/somename/icons-e09e4c81dabea7f47e8e80e2478342f9/favicon-16x16.png" />

You can see this is missing the hostname (and port when I was testing on port 8080 locally).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
RomanHotsiycommented, Apr 3, 2019

Hey, @julien1619.

Just a kindly reminder 😊

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android deep links not following path prefix - Stack Overflow
I have deep links in my app setup to use /app as the path prefix. The problem I'm having is that links like...
Read more >
Modifying path prefix for URL language detection causes error ...
The error is caused by the default language code not being set correctly. Propose modifying 1 line of code with test for empty...
Read more >
How to manage a complex DeepLinks scheme on your ...
Now we need to implement our function which will generate our injectable collection of <data> as a string, like you would do it...
Read more >
Deploying to Github Pages? Don't Forget to Fix Your Links
In Gatsby, you add a pathPrefix value to your gatsby-config.js : // Configure Gatsby to prefix all links with the Github repository name...
Read more >
Deploy Your Experience Cloud Site with the Metadata API
For each Experience Cloud site, the network component has a unique name and URL path prefix. When you retrieve the network component, the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found