#How can i deploy my angular static website application on github as a host

41 messages · Page 1 of 1 (latest)

smoky sonnet
#

i have tried a lot of ways from the internet but it does not work can someone tell me the latest and easiest way to deploy the static website using github and angular

fervent mesa
smoky sonnet
#

it show me readonly page

#

or sometime 404 error

fervent mesa
#

Also, I'd start with an updated Angular CLI app - not v13, clean repo and start from scratch

smoky sonnet
#

i did this process same process before and still

fervent mesa
#

Also, there seems to be an error here

#

Use a clean repo, update your Angular CLI, create a new app, start from scratch. Make sure you pass in the base-href property if you want to run it on something.github.io/reponame

smoky sonnet
#

idk why its hard to deploy a static application, almost giving up on this

#

maybe try firebase

fervent mesa
#

Try cloudflare pages

smoky sonnet
#

ok lemme see

smoky sonnet
#

The Angular CLI requires a minimum Node.js version of either v14.15, or v16.10.

#

Please update your Node.js version

fervent mesa
#

On CloudFlare pages you can set a env var NODE_VERSION and set value to 16

smoky sonnet
#

is that a property?

#

im using 16.8 node.js version but it still giving me error that your node.js is not update

fervent mesa
#

It's en environment variable

#

You configure it in your cloudflare pages build settings

smoky sonnet
fervent mesa
#

Well that's a different error message

#

So you are making progress

smoky sonnet
#

cloudflare using ng build --prod but i want to execute this command when its building cs "build": "ng build --configuration production"

fervent mesa
#

Well, try adding that! 💡

smoky sonnet
#

i did it in package.json but still showing same error

fervent mesa
#

That's because it's still listing the old command here

smoky sonnet
#

ohh wait

fervent mesa
#

That should say npm run build or yarn build

smoky sonnet
#

after so much trying after it generate a link for my demo website

fervent mesa
#

Yay!

#

I think after this you should be able to do it in 5 minutes - now that you know what the moving parts are 🙂

smoky sonnet
#

oh men soo much learned from it

#

YOU HELPED ALOT THANKS ALOT