1

Issue: I'm trying to deploy my react js project on iis and it just loads a blank page.

Info: In order to deploy application, I ran npm run build to create a production build and then set up the site through IIS pointing to build folder. From debugging mode in the browser it looks like its not loading some of the js files:

Screenshot of Errors: https://i.sstatic.net/Fwdf6.jpg

Does anyone have any tips on how to solve this issue?

2
  • 1
    This is a common problem. Do the answers here help you solve your issue? stackoverflow.com/q/55568697/6281832 Commented Aug 6, 2020 at 19:48
  • Thanks this fixed the issue :) Commented Aug 6, 2020 at 20:19

1 Answer 1

1

Solution :

  1. Delete current production build folder
  2. Add "homepage": ".", in the package.json file as advised in stackoverflow.com/q/55568697/6281832 .
  3. Open a cmd and type "npm run build" to create a new production build
  4. Deploy build as indicated in React Deployment on IIS server
  5. Enjoy your live site :)
Sign up to request clarification or add additional context in comments.

1 Comment

If your issue is solved then I request you to mark the helpful suggestion as an answer. This will help other people who face the same issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.