0

I am trying to deploy an Angular PWA to gh pages and receive this error on deploy: git-upload-pack '.': git-upload-pack: command not found fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

My scripts are:

"scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "watch": "ng build --watch --configuration development",
    "test": "ng test",
    "start-pwa": "ng build --prod && http-server -p 8080 -c-1 dist/billFold-client",
    "predeploy": "ng build --prod --base-href=/billFold-client/",
    "deploy": "npx gh-pages -d dist/billFold-client"
  },
  "private": true,
  "homepage": "https://gcy2312.github.io/billFold",

Has anyone been able to fix this issue? I've tried changing my scripts, using angular-cli-ghpages instead.... always the same error....

gcyr2312
  • 23
  • 1
  • 6

1 Answers1

0

It seems angular deployments are tricky - sometimes they won't simply create the gh-pages and it doesn't exist: run these scripts instead: install angular-cli-ghpages: npm install -g angular-cli-ghpages create gh-pages branch: git branch gh-pages set to new gh-pages branch: git checkout -b gh-pages build app: ng build --prod --base-href https://githubUsername.github.io/repositoryName deploy: ngh --dir=dist/projectName

gcyr2312
  • 23
  • 1
  • 6