Giter Club home page Giter Club logo

Comments (7)

localsite avatar localsite commented on August 18, 2024

$21 bounty:
https://www.bountysource.com/issues/60097790-error-running-npm-run-deploy-mock

from ngx-starter-kit.

xmlking avatar xmlking commented on August 18, 2024

to deploy to gp-pages:

  1. If you forked/cloned this repo as DirectoryBuilder/ngx-starter-kit-test on your GitHub account, you might have to change base-href as /ngx-starter-kit-test/ in package.json

    Example :

     "build:mock": "ng build -c=mock --base-href /ngx-starter-kit-test/",
  2. make sure you can do git pull/push from your project root with your git account.
    git remote -v should show something like this:

    origin  https://github.com/xmlking/ngx-starter-kit.git (fetch)
    origin  https://github.com/xmlking/ngx-starter-kit.git (push)
    
  3. Setup your repo's GitHub Pages settings to use gh-pages branch
    My Settings:
    image

Reference

https://github.com/angular/angular-cli/wiki/stories-github-pages

from ngx-starter-kit.

 avatar commented on August 18, 2024

Is this solved already?

from ngx-starter-kit.

xmlking avatar xmlking commented on August 18, 2024

This is not an issue of this project. He is asking about how to setup your github to host static websites via gh-pages.

from ngx-starter-kit.

localsite avatar localsite commented on August 18, 2024

How would I run without the silent option to view details on my error?

By forking the original repo, I now have a gh-pages branch, so I can view my fork of the demo site on GitHub here:

https://directorybuilder.github.io/ngx-starter-kit

However, I'm still not able to deploy the "dist" folder content to the gh-pages branch to view changes.

When I use the command line npm run deploy:mock to deploy changes to gh-pages branch, I'm still getting the error I initially posted:

Error: Unspecified error (run without silent option for detail)

1.) I kept the name ngx-starter-kit when forking the repo and when cloning my fork to my local machine, so no need to modify the "build:mock" value.

2.) git remote -v returns:
origin https://github.com/DirectoryBuilder/ngx-starter-kit.git (fetch)
origin https://github.com/DirectoryBuilder/ngx-starter-kit.git (push)
upstream https://github.com/xmlking/ngx-starter-kit.git (fetch)
upstream https://github.com/xmlking/ngx-starter-kit.git (push)

What steps can I take to deploy the 'dist' folder content to gh-pages branch?
(I'm avoiding removing /dist from .gitignore so it's not deployed to the master branch.)

Do I need to install the following or something similar?
https://github.com/angular-schule/angular-cli-ghpages

from ngx-starter-kit.

xmlking avatar xmlking commented on August 18, 2024
  1. you have angular-cli-ghpages in devDependencies in package.json so, no need to install it globally. PS: any local NPM packages's executables can be run, by prefixing npx which is part of Node v10 and above. i.e., npx ngh --version
  2. My npm run deploy:mock is basically two commands (you can see in package.json)
    1. npm run build:mock
    2. npx ngh --dir dist/apps/webapp

you can try to run them separately to isolate the issue .
after build, you can try following command to debug what is causing your issue.
npx ngh --no-silent --dir dist/apps/webapp
I am not doing any custom things with angular-cli-ghpages , if you cannot solve this error, I would advise to open ticket in angular-cli-ghpages issues.

Option 2:

If gh-pages approach doesn't work for you, you build and rename dist folder to docs,
then check-in docs , then change
Source --> master branch /docs folder settings on GitHub to publish form docs folder.

from ngx-starter-kit.

localsite avatar localsite commented on August 18, 2024

Thanks! I'd suggest including --no-silent in the package.json command for automatic error viewing.
The problem was outdated Github credentials stored in the keychain app on my local machine.

To update on Mac: In Finder, search for the Keychain Access app. In Keychain Access, search for github.com and edit or delete.

To update on Windows: Go to: Control Panel -> User Accounts -> Manage your credentials -> Windows Credentials. Under Generic Credentials find Github and edit or "Remove".

Please claim the bounty! Mahalo for your kokua!!

from ngx-starter-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.