Azure shows error ENOTEMPTY: directory not empty, rmdir '/home/site/wwwroot/node_modules/fsevents/node_modules/semver'\ - reactjs

I am receiving an error on Azure while getting it to build.
I have a react app and my azure is connected with bitbucket. So when I upload the changes to my bitbucket the Azure starts building and deploying the changes and fail with the errors in the following screenshot. I am not sure what is happening to it because I am new to Azure. Please guide me, guys! Thank you.
Note: I have received the same kind of error on my windows env laptop when I build my react app locally, But I haven't received it on my Linux environment pc. Could it be possible that the files didn't copy properly when I tried to move the project through pen drive?. On my windows laptop, I receive this kind of error on npm run build but when I run the npm command three times it satrts building properly on the third time without any error.

Related

TypeError when hosting React App on Azure

I'm working on a project that I'm trying to host on Azure. The back end service deploys and runs great. The front end project does not. When I deploy it, on accessing it I just get a blank screen and in the console it shows the error TypeError: Object(...) is not a function. The same thing happens if I locally do npm run build then serve -s build. However, if I just type npm start then it runs correctly and I can access it via browser. Am I doing something wrong in the project itself? Or is there something I need to do on Azure to get it to work?

Deploying ReactJS app from GitHub to Ubuntu via Actions

My team is working on an NodeJS app with a ReactJS frontend that needs to be deployed on our Ubuntu server. It runs fine locally and it used to run fine on the server until we added a Router/Switch structure into the App.js. Now we get 404 and 502 errors and I'm thinking of adding some GitHub action to automate the deployment process with npm run build and all. Ideally, every time we push to GitHub, the app on the server should update without someone having to tunnel in and type something manually. Can anyone suggest a ready-made YAML file for that purpose? How would we trigger it on our Ubuntu server? Would we run it under nginx (like now) or apache?

How to deploy React.js application that makes server calls to IIS?

Really new to web dev. so forgive me if this is a simple issue...
I want to host a React application on Microsoft IIS. This application makes server calls: this is the project I am trying to do https://www.twilio.com/blog/react-app-with-node-js-server-proxy)
What happens when I link the build to IIS is that I'm able to type something in the form, but I'm unable to see a response from the application (the fetch call is being made but is failing and nothing is returned). When I run npm run dev in the project folder the form works as it should, so it appears that the server isn't being hosted(?).
to deploy react application in iis follow below steps:
1)run below command to build the site:
npm run build
the above command creates a build folder inside your application folder.
2)now open iis manager.right-click on the server node and select create new site.
provide site binding detailed and set the folder path of the site to the build folder which is generated by the command.
https://stackoverflow.com/a/60110712/11147346

AspNetBoilerplate REACT template - error after npm start

Today I downloaded the ABP Asp.Net Core REACT SPA template. After downloading, I ran npm install and then npm start. These two steps worked, no issues.
Once the REACT app has started, the browser opens up and all I get is a blank page. Then after a few seconds the below error dialog box comes up.
When I look at the chrome console, I find the errors shown below.
I'm new to REACT and very much still learning it. So I could use some help in tracking this error down.
Please note I did run the migrator project and got the DB setup on my PC and updated the connection strings to ensure connectivity for the .NET code.
Follow steps below to check whether you miss any step:
VS 2019 Open abp project
Change YourProjectName.Web.Host -> appsettings.json -> ConnectionStrings.Default
From VS 2019 PMC, set YourProjectName.EntityFrameworkCore as Default Project
Run update-database which will create the database
Set YourProjectName.Web.Host as Start Project, and run YourProjectName.Web.Host
For expected result, you will get http://localhost:21021/swagger/index.html
CD reactjs folder and run npm install and npm start
http://localhost:3000/user/login will show up.

How to deploy perfectly Laravel Project with ReactJS to the server

I have project combination of Laravel and ReactJS but i got problem deploying it to our server almost 2 weeks still don't know why i can't access it.
when i try to access the browser.
This site can’t be reached
Step that i do before I deploy the project.
NPM Install
npm run production
zip the files to my computer and paste to the server
No error found when i view the error.log in our server.
Why it happen when i type my link
Example.
www.thisisexamplewebsite.ca
The .ca domain turns to cauwsta
I hope someone could help me and to solved my problem.

Resources