All Questions
Tagged with deployment reactjs
1,672
questions
592
votes
26
answers
646k
views
How can I update the parent's state in React?
My structure looks as follows:
Component 1
- |- Component 2
- - |- Component 4
- - - |- Component 5
Component 3
Component 3 should display some data depending on state of Component 5.
Since ...
68
votes
3
answers
31k
views
How to deploy a React + NodeJS Express application to AWS?
I have a React + Webpack/Babel + Node/Express application and I want to deploy it on AWS.
Would I have to deploy React and Node/Express separately? Or could they be deployed together at once?
67
votes
16
answers
72k
views
Treating warnings as errors because process.env.CI = true. Failed to compile
I am working on a react-weather application for self learning purpose.
Deployed the same in gh-pages.
URL
https://davisraimon.github.io/react-weather/
Repo
https://github.com/davisraimon/react-...
34
votes
7
answers
59k
views
React app has to clear browser cache after new deployment
We are deploying our React application on the apache server using the Jenkins pipeline.
When we deploy new codes, most of the new features work fine but not for all changes reflect the latest in the ...
32
votes
6
answers
72k
views
"Invalid Host Header" in When running React App
I am having one simple project of React JS and I am deploying into OSE. Also I am using below dependencies in my project.
"webpack": "^2.2.0",
"webpack-dev-server": "^1.14.1",
"react": "^15.5.4",
...
28
votes
4
answers
3k
views
How to handle deploys with Webpack code splitting?
Here's an unexpected issue I've run into with Webpack code splitting in the wild: Imagine this scenario:
The user loads a React app with Webpack code splitting and a few bundle chunks are loaded
A ...
25
votes
1
answer
25k
views
How to deploy separated frontend and backend?
I am developing a new project with react/express as the frontend and loopback as the backend api. I have separated both of them in my development environment with different ports.
How should I deploy ...
25
votes
6
answers
17k
views
Uncaught Error: Minified React error #425
When moving my application to production, these errors appeared, and I have no idea what it could be.
I'm using:
// package.json
"dependencies": {
"@supabase/supabase-js&...
24
votes
6
answers
29k
views
Github pages still shows README after deploying React app
I have a create-react-app project (https://github.com/khpeek/beomaps/tree/master) which I'd like to deploy to Github pages using gh-pages. Following this tutorial, https://medium.com/@serverlessguru/...
24
votes
6
answers
19k
views
Azure App Service Getting error while deploying REACT JS application
Getting error while deploying to azure app services from the editor.
4:48:55 pm ppdedsrftwu2-appservice1: Starting deployment...
4:48:56 pm ppdedsrftwu2-appservice1: Creating zip package...
4:49:00 pm ...
23
votes
4
answers
58k
views
How to run Next Js application build (out) directory?
I have done development of Next Js application and as of now I have done auto deployment using vercel
Things are fine as of now.. But here came the requirement that I need to build the Next Js ...
19
votes
4
answers
11k
views
Could not find a required file. Name: index.html in react with docker compose
I have my react app set up with create-react-app and I was trying to run it with Docker container and Docker compose.
However, I got the following error when I ran it with Docker compose.
web_1 |...
18
votes
2
answers
6k
views
NextJs export folder "out" doesn't have index.html
I’ve built a Next.js app, and I wanted to use static exporting to host the project on my hosting. The app is simple, so I didn’t use most of the features that Next.js offers. When I run:
npm run build ...
17
votes
6
answers
27k
views
How to deploy a create-react-app to a web host (ex. Siteground)?
I'm building a react project using create-react-app and am trying to figure out how to deploy my code to my hosting server on Siteground.
Does anyone know the best way to do this? Do I import my ...
17
votes
1
answer
8k
views
Why is create-react-app's build directory in .gitignore?
This is clearly something I'm misunderstanding but I'm desperately struggling to find an answer.
I've been teaching myself React with create-react-app, I've run "npm run build" to spit out my ...
16
votes
8
answers
25k
views
Next JS : Error: EPERM: operation not permitted, open
I am trying to build the next Js app production files to deploy it on cPanel, when I execute
npm run dev the app is working just fine but as I start to build a production file with the help of this ...
16
votes
10
answers
35k
views
ReactJS: How to deploy on local server
I have a web app developed with a NodeJS + Express + GraphQL + MongoDB back-end and a ReactJS + Apollo front-end. I would like to deploy this application locally. Is that even possible?
I have come ...
15
votes
3
answers
22k
views
ReactJS deploy app error Cannot copy to clipboard: Command failed: xsel --clipboard --input
I'm trying to deploy a ReactJS app in my Ubuntu 16.04 server but when I execute the command:
serve -s build
This is my package.json file:
{
"name": "client",
"version": "0.1.0",
"private": ...
15
votes
3
answers
30k
views
Can I deploy my ReactJS app on a regular host?
I've seen many guides where people teach you how to deploy your react app on services like digital ocean, heroku, GitHub Pages, aws.
But I'm wondering if I can deploy my React app (create-react-app) ...
15
votes
3
answers
12k
views
Deploying Reactjs website on github pages with routing results in 404 error on refresh
I've created a ReactJS webpage with multiple routes using BrowserRouter and deployed in via GitHub pages with its own domain. The website works perfectly as intended, however, when I refresh the page ...
15
votes
1
answer
23k
views
What does "Export CI=true" do in this create-react-app deploy script?
There's a file called launch.sh in our Create React App, that is used to publish things to the CDN. One of the lines in there says export CI=true. I have no idea what "CI" means in this context, and ...
13
votes
15
answers
19k
views
React : CSS class name import not working
i have a <main> div in my react component and im importing some class name from a class css file, but the class name is not getting integrated to the main div when i try to inspect it in the ...
13
votes
3
answers
15k
views
React app is looking for static files in different location when using proxy
I have used npx create-react-app my-app to create a react app.
The I used npm run build to build the app and deployed it using serve -s build
I'm using a proxy server to make my app publicly ...
13
votes
4
answers
12k
views
How to deploy next.js 9 to aws lambda
I am developing a project with next.js9. I have some problems and questions. I would like to deploy my next.js 9 project to AWS lambda.
official next.js 9 doc tell me "each page in the pages ...
13
votes
2
answers
33k
views
Setting base href using Environment variables
Need to set the href value for <base href=""/> tag based on build environment configuration.
Eg:
Staging should have <base href="/staging" />
Prod should have <base href="/" />
...
12
votes
4
answers
31k
views
How to deploy MERN stack to a hosting service?
I am new to web development and I have a hosting service on which I want to deploy my reactjs/node project. To deploy it previously, I had been simply uploading the build folder created from running ...
11
votes
5
answers
27k
views
404: NOT_FOUND on Vercel deployment
I have build a web3 application using chakra-UI and three.js. I have added a metamask integration to the website, which helps to mint the NFTs on smart contract.
When I do,
npm run dev
On my machine, ...
11
votes
4
answers
6k
views
Netlify does not recognize the URL params when using react-router-dom
I am creating a react app that uses react router. I am using the router to match the paths like :/bankName-:credit and it works fine in local development. The only require path for my application is :/...
11
votes
2
answers
13k
views
How to Deploy Django Rest Framework and React on AWS
I am very new to deploy Django and AWS. So now I would like to deploy my separate project (drf + react) to AWS.
So How can I deploy the separate project to AWS?
EC2 vs Elastic BeanStalk which one ...
11
votes
2
answers
4k
views
Trigger hard cache refresh when index.html changes in create-react-app deployment
I'm currently building and deploying my create-react-app site using "react-scripts build", and then copying the contents of the build directory to an apache web directory. The web directory contains ...
10
votes
4
answers
41k
views
how to deploy reactJS application on Tomcat Server
I am new in reactjs, I want to deploy my reactjs application on tomcat server instead of running on react server which is default port is 3000.
I run the npm serve command for running the npm local ...
10
votes
2
answers
20k
views
Deploying react app on github pages front and backend in the same repository
I am trying to deploy a react app with the backend into the same repository on github pages. It all works fine until I add the backend code to it. I can deploy the front-end, but I cannot figure out ...
9
votes
6
answers
40k
views
How to deploy a nextjs application on cpanel?
I followed these steps to deploy my nextjs on cPanel.
go to package.json and add this line: "homepage": "http://afsanefadaei.ir"
run next build to have .next folder as my build folder
go to cpanel &...
9
votes
6
answers
14k
views
Nginx and Create React App (with React Router) full routes not working
I have been stuck on this for days now and I need the internet's help.
I have created a static HTML landing page project for my react application (These two projects are separate), and I wish to serve ...
9
votes
8
answers
16k
views
NextJs vercel deployment error "routes-manifest.json" couldn't be found
My nextjs app was working properly I added some files to update my code now it is not deploying my app on vercel. gives this error
I tried googling the error but my case in unique.
This is the git ...
9
votes
1
answer
11k
views
Deploying react app with webpack
I am doing a tutorial on React and I have made a youtube clone based on react. Now I wanted to upload this to my domain (hosted at one.com) but it doesn't work because bundle.js can't be found. Rather ...
9
votes
1
answer
954
views
How to deploy JS app that has code splitting, making sure past app versions don't break
I have a simple PWA app built with Webpack and React.
It has code splitting setup on dynamic imports (e.g. React.lazy(() => import('./SomeRoute'))) so different routes get different JS bundles, e.g....
9
votes
2
answers
769
views
generateAppendClassName: CSS module is undefined
I have a React v15 web app that runs fine at localhost. Yet when I deploy it to GitHub pages, I have a CSS module is undefined error:
I've set up a test repo for this issue: https://github.com/...
8
votes
1
answer
2k
views
TypeError: braintree.connect is not a function
I've implemented a braintree using its documentation but, facing this error in the terminal.
it's showing that braintree.connect is not a function, but in the documentation it has been provided hard ...
8
votes
2
answers
7k
views
Why is my vercel project giving me an error 404 on refresh?
I have a simple React + Vite project that I deployed on Vercel for the first time for fun. But whenever i hit refresh on a sub-route, it sends me to a 404 page.
I'm using react-router-v6 for the ...
8
votes
1
answer
4k
views
Deploying and development env for Django and React
I build a nice web application with django and react and i want to deploy it, during development i used to have to separate app which run on different ports on my sys, django app and react js app.
I'm ...
8
votes
1
answer
8k
views
How to deploy React app with docker and serve -s build
So far I have build the image and deployed it to AWS EC2. But I want to use
serve -s build
to serve the app in production mode.
I did it locally and apparently everything seems to be fine..I get this....
8
votes
2
answers
17k
views
'serve' is not recognized as an internal or external command to run react app
serve has been installed globally using npm install -g serve command and It works locally, but deploying to a Windows server gives the following error:
"serve" is not recognized as an ...
8
votes
7
answers
9k
views
NextJs: The Serverless Function exceeds the maximum size limit of 50mb
I'm new working with NextJs and when trying to deploy my project to Vercel I'm getting the following error:
Error! The Serverless Function "api/auth" is 50.55mb which exceeds the maximum ...
8
votes
3
answers
5k
views
How to get a React.js app running on Azure App Services?
I have a simple React.js app that works 100% perfectly fine on my localhost.
e.g.
- clone git repo
- go to the root folder of the cloned repo
- npm install
- npm start and the browser opens up on ...
7
votes
2
answers
9k
views
Deploying react project on Azure
I want to deploy my react project on azure cloud. I already deployed it on heroku and there it was very easy to deploy. I just had to do git push heroku master to deploy it on heroku. But I am ...
7
votes
2
answers
5k
views
How to deploy React App on production with Server Side Rendering
I have created my application using create-react-app. It is working fine with SSR. Everything is in place but I don't know how to deploy it?
What I ideally want is :
Generate a build folder and will ...
7
votes
2
answers
5k
views
How can I resolve ReactMarkDown that uses "children" as a prop w/ Error Do not pass children as props
I have a Next.js app that I'm deploying to vercel and am using ReactMarkDown component to render some content from a Strapi backend.
While this works locally, deployment fails with the following log:
...