Build changes not reflected in deployed app - javascript

I have a Django/ Vue.js app that I deployed to Heroku. It's repo is connected to Heroku so I deploy it straight from the Heroku app.
I've updated the code and run "npm run build" afterward. I run 'git add *', checkd that every files where tracked, commit them and push them to the repo.
Afterward I did a manual deploy from the Heroku app. Deployment went fine but the changes are not reflected into my deployed app.
What went wrong? Did my build failed (had no error message while building and I did get the 'build Complet' message)
I don't know where to look at. How can I be sure the changes I made are reflected into my build?
What I tried:
-deleting the build folders and "run build" again with no luck
-force my browser to clean the cache with no luck either
What I did:
I wanted to change my login/logout url redirection

Related

unable to host slack bot on vercel

I've created a slack bot that I want to deploy with vercel and I keep getting the error:
Error: Command "npm run build" exited with 1
when running vercel deploy.
In my package.json file I have:
"build": "next build"
which is obviously incorrect as it throws this error.
The vercel docs suggest (https://vercel.com/docs/errors#error-list/missing-build-script)
"scripts": {
"build": "[my-framework] build --output public"
so my question is, what is actually expected in here in order to make this work?
I would really appreciate some help getting the project up and running so I can use it on slack. It works locally just fine, but can't get it up and running without me starting it locally.
Here is the repo: https://github.com/Chaffexd/weds-slack-bot
The correct build script for a nextjs app is next build.
Your script currently has npm run-script build.
Which is actually the equivalent of telling it to run itself over and over, it's self referencing.
Also, as an aside, your app is not going to work on Vercel. Vercel is a serverless environment, meaning long running applications like the one you have written that is continually listening on a port (I imagine when you run it locally it hangs for input) are not supported. You should refactor your app to respond to requests, which can trigger your function.
A good way of building this app on Vercel with NextJS might be to use the NextJS API folder for your application code, and then find a free CRON runner to repeatedly hit that function endpoint every day.

Switching between pages does not work on a react app that is deployed on Netlify

I created a react project and ran npm run build in terminal so I could deploy it on Netlify.
If I run npx serve -s build in terminal and open the link, page works as expected.
When I deploy build on Netlify everything works fine until I try switching pages. I get an error where it says Page not found.
I haven't tried anything else after deploying the page on Netlify since I have no clue what could be the problem.

Unable to deploy react application to heroku

so I just finished building the beta version of my e-commerce application and decided to deploy to heroku from my github repository.
The first issue I ran into was not npm run build (which I did then pushed it to github) then redeployed.
Next issue was my build failed because I didn't specify the version of node. (SO i want into the package.json and typed in...)
"engines": {
"node": "16.14.2"
},
Again, redeployed I got through the build and I thought all was well. BUT I get an application error (fun) and so I go into heroku logs to see what I did wrong. Problem is I actually don't know what i did wrong. This is what the log says

How to Update Deployed React App on GitHub Pages

recently I have deployed my first React App on GitHub Pages
https://karan-dhingra.github.io/lct/
Now I updated react app and my changes are not reflected on GitHub Pages. But everything was working well on Localhost. So, please guide me on how can I update my deployed React App on GitHub Pages.
Just we need to run 3-4 commands
git init
git remote ****************.git [ Here we will add our repository link ending with.git you will found it in the code option in your repo.
npm run deploy [Make sure you have installed gh pages first]
git add .
git commit -m "Here you write message while committing, you can write anything here"
git push origin master
So, with using these commands everything will work well.
Make sure you save the code in the IDE. after saving check with "git status" command and commit & push to git repo and the changes will be reflected
In my case, the lines below have helped. My app is deployed via gh-pages:
git add .
git commit -m '...'
npm run deploy

Trying to deploy a create-react-app project to Netlify

My current project is having trouble building in the Netlify platform. I am able to build my app locally just fine and host it through gh-pages, but when I try to build the same app, I run into this error.
Netlify Deploy Log
11:10:03 PM: Failed to compile.
11:10:03 PM:
11:10:03 PM: ./src/pages/Mortgage.js
11:10:03 PM: Cannot find file '../hooks/UseWindowSize.js' in './src/pages'.
Current Folder Structure
src
--hooks
----UseWindowSize.js
--pages
----Home.js
----Mortgage.js
Any idea what the issue might be?
This is how I managed to get it working.
I added the site on Netlify by linking it via a Github repository. Then inside on Netlify, I did the flowing:
Click on the Sites menu link and select the site you would like to deploy
To access the Settings, click on either:
The Site Settings button - is located in the first block/widget below the menu
Deploys in the menu next to Site Overview then click the Deploy setting button - located in the first block/widget below the menu
Below the first block/widget click the link Build & deploy -
located in the left side navigation aside
In the Build settings widget block, click the Edit settings button.
Change Base directory to ./
Change Build command to npm run build
Change Publish directory to ./build
Scroll down to Environment variables and add the key PRODUCTION, set the value of PRODUCTION to true
Retry your build to see if the configuration worked.
Side note: It's a fresh create react app react install, no 3rd party librarys yet.
Happy Coding =)
Pro Tip - create a netlify.toml file in the root of your project and add the following:
# Production context:
# All deploys from the main repository branch
# will inherit these settings.
[context.production]
command = "npm run build"
[context.production.environment]
PRODUCTION = "true"
Ive noticed that using a boolean value as a string works but if you use it like normal the build breaks
To be honest, using Vercel with React is way easier, and it's also better.
Push project onto a repository, go to vercel's site, login with Github, and choose your repository and it does 95% for you.
Netlify also has some problems with React-router, so Vercel is over all a clear winner.

Categories

Resources