react js project working when i run with npm start command, but when i create build and upload to server its not working , i have also set the path of homepage in package.json file.
build.zip
this is a build folder.
and
src.zip
this is a src folder of my project
i am unable to find the issue.
i think this is happen because of router
{
"homepage": "http://localhost/my-app",
"name": "my-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"datatables.net": "^1.10.16",
"datatables.net-dt": "^1.10.16",
"react": "^16.3.0",
"react-bootstrap-table": "^4.3.1",
"react-dom": "^16.3.0",
"react-router-dom": "^4.2.2",
"react-scripts": "1.1.1",
"reactable": "^0.14.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
react js project working when i run with npm start command, but when i create build and upload to server its not working , i have also set the path of homepage in package.json file. build.zip this is a build folder. and src.zip this is a src folder of my project i am unable to find the issue.
i think this is happen because of router { "homepage": "http://localhost/my-app", "name": "my-app", "version": "0.1.0", "private": true, "dependencies": { "datatables.net": "^1.10.16", "datatables.net-dt": "^1.10.16", "react": "^16.3.0", "react-bootstrap-table": "^4.3.1", "react-dom": "^16.3.0", "react-router-dom": "^4.2.2", "react-scripts": "1.1.1", "reactable": "^0.14.1" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject" } }