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.

Production paths are relative to docroot, not current folder

See original GitHub issue

I did a yarn build and then tried to serve the contents of the build folder with Apache webserver. I wanted to serve it from chatserver.example.com/admin but that results in 404s when trying to load chatserver.example.com/static/js/main.78b12af2.chunk.js which is no surprise… the files are in chatserver.example.com/admin/static/js/main.78b12af2.chunk.js

This would be solved if the path in the index.html lacked the initial slash. Eg:

<script src="static/js/2.2e1c8a1a.chunk.js">

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
awesome-manuelcommented, May 4, 2020

Should be fixed with 1002b6464a1093b000ebf1d3e9b26cb04526ff11

See also https://github.com/facebook/create-react-app/issues/527

0reactions
MexHighcommented, May 23, 2022

You can now do this with Docker Compose as well. See README.md and #266 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Relative and absolute paths, in the file system and on the web ...
If the path is built starting from the current location, it is called relative (which makes sense, as it is relative to our...
Read more >
Cannot make Relative Path, Rewrite Rules and Routes ...
I've updated my answer to better explain the document root and have provided a sample config for an apache virtualhost. This should get...
Read more >
Paths explained: Absolute, relative, UNC, and URL—Help
Relative paths are relative to a current directory, which is the location of the saved document or toolbox.
Read more >
Problems with using relative path names [#13148] | Drupal.org
Looking at my site's logs, there seem to be several problems that are caused by Drupal's use of relative path names. If Drupal...
Read more >
Absolute and Relative Paths
A link that has a relative path will be written to tell the computer how to get from the folder with the currently...
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