- After deploying my react application on Netlify, I used the npm run build command to create the local scripts and manually deployed them in production mode on Netlify.
- The build scripts were generated on my local machine and then uploaded to the Netlify site, resulting in a successful deployment message.
- However, when I clicked on the URL link, it initially displayed a 404 status for the GET request of the build scripts.
- To resolve this issue, I included a redirects file in the build folder which changed the status to 304 for the GET request but now showed an error stating: "syntax error: uncaught error: unexpected token <"
- In an attempt to debug this problem, I commented out certain files and ran the code again to find the root cause without success.
- If anyone can offer suggestions or point out where I may have made a mistake, it would be greatly appreciated.
- You can access the deployed application on the following Netlify URL link:
- The source code for the application is available on GitHub at: https://github.com/aarivalagan/react-one
- I have also attached screenshots of the application below for reference:
- Below is a snippet of the code:
_redirects
/* /index.html 200!
package.json
"scripts" : {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
}