Skip to content

Local installation #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JohannesHoppe opened this issue Feb 13, 2017 · 2 comments
Closed

Local installation #5

JohannesHoppe opened this issue Feb 13, 2017 · 2 comments

Comments

@JohannesHoppe
Copy link
Member

@petersgiles

@JohannesHoppe yep that's the way it happened for me.

I tried installing npm install --save-dev angular-cli-ghpages and it didn't make the ngh available so I uninstalled it and did npm install -g angular-cli-ghpages and it worked.

macOS Sierra

node: 6.9.5
os: darwin x64
@angular/common: 2.4.7
@angular/compiler: 2.4.7
@angular/core: 2.4.7
@angular/flex-layout: 2.0.0-beta.5
@angular/forms: 2.4.7
@angular/http: 2.4.7
@angular/material: 2.0.0-beta.1
@angular/platform-browser: 2.4.7
@angular/platform-browser-dynamic: 2.4.7
@angular/router: 3.4.7
@angular/cli: 1.0.0-beta.31
@angular/compiler-cli: 2.4.7

see angular/angular-cli#4385 (comment)

@JohannesHoppe
Copy link
Member Author

by @tkow
from angular/angular-cli#4385 (comment)

It seems @petersgiles 's problem not that ngh command is not incleded in your path because node install packages in node_moudules/.bin when local installing. $(pwd)/node_moudules/.bin path are exported when npm commands run before executed so that node's package commands are available in scripts in package.json but not shell environment with no explicitly path prefix . npm support npm bin command which get path $(pwd)/node_modules/.bin So, you can use ngh commands by $(npm bin)/ngh ... .

@JohannesHoppe
Copy link
Member Author

I tested this out and it works flawlessly via npx. (Nodejs 8 or higher required)

npm i angular-cli-ghpages --save-dev
npx ngh [OPTIONS]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant