У меня есть приложение с activ.js. Я хотел пойти в производство.
Я сделал
npm run build
serve -s build
Я продолжаю localhost:5000
Страница приветствия работает очень хорошо, но когда я захожу localhost:5000/main
у меня появляется ошибка
404 | The requested path could not be found
Я пытался повторить npm run build
, но это не сработало
Что вы предлагаете?
РЕДАКТИРОВАТЬ
Package.json
{
"name": "name-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"firebase": "^5.10.0",
"node-sass": "^4.11.0",
"p5": "^0.8.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-p5-wrapper": "0.0.4",
"react-router-dom": "^5.0.0",
"react-scripts": "2.1.8",
"socket.io-client": "^2.2.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"description": "This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).",
"main": "index.js",
"devDependencies": {},
"author": "",
"license": "ISC"
}