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

Optimized production build has invalid url references #4812

Closed
Leejjon opened this issue Jul 22, 2018 · 1 comment
Closed

Optimized production build has invalid url references #4812

Leejjon opened this issue Jul 22, 2018 · 1 comment

Comments

@Leejjon
Copy link

Leejjon commented Jul 22, 2018

Is this a bug report?

Yes

The output from running npm run build will result an index.html page that doesn't load the static generated javascript file.

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

I read:
https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#deployment

Environment

image

Steps to Reproduce

  1. Clone my code: https://github.com/Leejjon/BlindpoolFrontend.git
  2. Run git checkout develop
  3. Run npm install
  4. Run npm run build
  5. Open build/index.html in a browser and see a white page.

Expected Behavior

To have the link to the script not start with a /

I can fix the page by removing the first / from all the url references in the generated index.html. But I don't want to do this every time I do a deployment (I would like to automate it).

Actual Behavior

image

image

Reproducible Demo

See steps to reproduce.

@Leejjon Leejjon changed the title Optimized production build has invalid links to scripts Optimized production build has invalid url references Jul 22, 2018
@Leejjon
Copy link
Author

Leejjon commented Jul 22, 2018

Sorry, didn't read the console output properly. This issue is a duplicate of: #527

Solution is to set homepage to '.' in the package.json

@Leejjon Leejjon closed this as completed Jul 22, 2018
@lock lock bot locked and limited conversation to collaborators Jan 18, 2019
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

1 participant