score:-1
new answer: there is no need to run the serve command on the server. just put the build folder on the server. inside the .conf apache file make the documentroot path point to the build folder.
old answer: changing these lines:
proxypass / http://localhost:5001/
proxypassreverse / http://localhost:5001/
to:
proxypass / http://my-server-ip:5001/
proxypassreverse / http://my-server-ip:5001/
solved the problem
score:2
run serve -s from inside of the /build folder. exemple
c:\users\zafriha\desktop\myproject>build>cd..
c:\users\zafriha\desktop\myproject>npm install -g serve
c:\users\zafriha\desktop\myproject>serve -s build
Source: stackoverflow.com
Related Query
- React app showing page with "404 the requested path could not be found" when using Apache
- Why does my react app go to the custom 404 not found page when the link is clicked?
- 404 Not Found when hard reload the page in react js with react build
- 404 Not Found error in preflight OPTIONS when executing a PUT method in CakePHP API with axios in React App
- Surge-deployed React app - getting 404 Page Not Found
- Webpack in React can't load the 3D model with a GLTF extension, shows 404 not found
- My 404 not found page with React router is not working
- React form returns 404 not found when trying to sign up with Devise Rails API
- Flask + React + Nginx: pages showing 404 not found for all routes with port number 80
- Better way to handle 404 page not found in a React app
- React app not loading js file when accessing it with a non home page url
- 404 not found when using socket.io-client with react
- my page is not rendering with different id on the same page when i use link in react components
- Faced Failed to load resource: the server responded with a status of 404 () when uploaded my react app to github pages
- Requested URL not found when refresh the page
- React App - Why m count down is showing a dot whent the hours are equals to zero? And my minute is not 00 when pass of 59
- Why is my page not updating with the addition of an element to my array when using React
- Docker Compose with Docker Toolbox: Node, Mongo, React. React app not showing in the said adress
- Why is my react app not navigating to the page when I click the link?
- webapi 404 not found when calling from react with post action
- React Error The requested URL was not found on this server when refreshing
- 404 error when refreshing the page - React App deployed on Heroku
- React Native: JAVA_HOME is not set and no 'java' command could be found in your PATH
- Create React App not showing error message with ErrorBoundary
- requireNativeComponent: "RNSScreenStackHeaderConfig" was not found in the UIManager when running android app
- Is there a way to tell when your react app page is done loading the page / assets?
- Next JS npm start app load 404 page not found error for physical pages
- 404 page not found when running firebase deploy
- react-router throwing 404 upon page refresh with React app hosted on GoDaddy
- API route not found in a Next.js App (The page could not be found)
More Query from same tag
- I want to add diffrent text on diffrent carousel slide in react
- Only last list item gets rendered in React
- useState state update in callback referencing old state
- React component with variable from localStorage
- How to make regular javascript work in a react app
- Adding an item to react state dictionary
- How would I change the state/setState of an object nested in an array of an object in an array?
- Passing props through multiple components (four), parent State not updating
- how to use express res.locals with typescript inside next.js
- How to configure react-hooks/exhaustive-deps additionalHooks for modules?
- PropTypes shape get marked as required
- React Router transition in and out events
- Get Div's new left position percentage on drag
- Dynamically changing the Image source for HTML,JSON
- Conditionally show Tooltip depending on parent Popper component being open
- props is undefined react, trying to access props passed in a stateless component
- Typescript and useRef hook causing type error
- How do paginated and filtered responses work in Redux?
- Make a card component as drawer Ant Design
- Matched leaf route at location "/" does not have an element
- Is it possible to extend the borders of table data <td> to align with content that has been moved via negative margins?
- CSS: How to remove space between image and border?
- Navigate a React App link to Express server dynamically
- Can I release what I import in a ES harmony style JavaScript?
- How to create a sticky navbar on react (inside a div)
- GraphQL: Warning: Failed prop type: Invalid prop `query` of type `object` supplied to `StaticQuery`, expected `string`
- React passing component with props and decorate it
- How to insert Bold tags into a template literal string in react and typescrip
- How to redirect with flash message react-router 4
- Typescript and object literal lookups