Push Rejected when deploying to Heroku - reactjs

I am trying to push my react-app to Heroku but I keep getting this error.My console
I have tried deleting and adding my package.json but it is still not working. Here is my package.jsonPackage.json
Thanks in advance!

Could you try to run npm run build locally and see if the build is running successfully?
Seems as though the react-scripts build is failing on heroku.

Related

Cannot run npm run build due to error ".next/status/media/IMG" does not exist

I'm trying to deploy a static react website (nextjs) and I cannot due to the npm run build command not being able to run. I have an image in my public folder and it's saying it doesn't exist. I've never done this before and don't understand the error I'm getting. The github repository is https://github.com/mattmoon00/portfolio-website . I have tried using vercel and netlify and they both gave me the same error. I also cannot run "npm run build" in the terminal on my machine either. Thanks in advance.

npm run deploy failure when deploying React app to Github

Problem:
I am still very new to React and am trying to push my React app onto Github, but I keep running into an error when I deploy it on my console.
Set Up:
I am using Atom on a Windows 10 computer. I created my React app by using the commands, npx create-react-app jordon. I then followed the steps in this youtube tutorial. This is what my package.json looks like after following the tutorial:
I then went through the steps to initialize a github repository. However, after running npm run deploy, I come across an error:
I have tried to rerun the steps in the tutorial time after time, but either receive the same error, or an error that is resolved by uninstalling gh-pages from the folder but leads to the same error. At this point, I have not found any resources that would help me, since most people seem to have successfully ran the npm run deploy command. Any help would be much appreciated!

Newly created React app crashes on live server

Whenever i create a react app using create-react-app and run npm run start it crashes.
This is the error i am getting in terminal.
Failed to compile ../node_modules/react-dev-utils/webpackHotDevClient.js
Error: [BABEL]/Users/toures/Desktop/REACT/SecondSummit/try1/node_modules/react-dev-utils/webpackHotDevClient.js:
Cannot find module './src/data'
(While processing: "/Users/toures/Desktop/REACT/SecondSummit/try1/node_modules/babel-preset-react-app/dependencies.js$0$9")
Can anyone guide me? Thanks.
In the past I've fixed it by deleting the node_modules folder, then running npm install.

Gatsby site 'page not found' when deploy on Netlify or Surge

I could run on localhost, however the site could not show up on Netlify and Surge as I tried to push it on Git. Feel free to check my code: https://github.com/treycwong/bean-tracker
I'm not sure if it's partly due to the dependencies in package.json or if I need to install Yarn? If so, some guidance will be helpful.
Added build settings on Netlify
Removed yarn.lock
With Surge, I've followed the instructions, I've deployed it successfully but still the page shows 'page not found'.
Your Netlify setting should be as follows, if you are not going to use yarn.
Publish location: public
Build command: npm run build
/netlify.toml
[build]
publish = "public"
command = "npm run build"
I know it's an old post but this could help more than one.
I've just deploy a Gatsby site to Netlify and I got the Page Not Found error.
I fixed it configuring the build settings as following:
Once I did it I got a Node error cause Netlify works by default with an old version. So I needed to force to use a newer one setting the Environment variable to the same I'm using locally:
Hope it helps to someone else!

Need help deploying react application with netlify

Not familiar with how to use netlify. Im trying to deploy this app
https://github.com/Rshauneb/real-estate
my build command is:
npm run watch
but every time I try to deploy my site I keep getting this error.
"failed during stage 'building site'"
Any suggestions?
Mimic what Netlify is doing in the build using their build bot.
Clone your project into a clean directory from GitHub
npm install
npm run watch
If you do not get an error, you may have a global command or setting that does not get set on Netlify. Without more information, this is the only answer possible.
Here is the error I found when I did the above:
Problem #2
Watch is a command for local development, so you should not be using npm run watch as a build command on Netlify. You will need to run the command to build your site into a directory for deploy and use that directory for your "Deploy directory".

Resources