npm - Bluemix node buildpack and modules in private repos -


my node.js app uses number of private shared modules hosted in git repos. use git urls below in dependencies block in package.json:

"xxx-accountmgr": "git+ssh://git@github.xxx.ibm.com:xxx/lib-account-mgr.git", 

when "cf push" errors during npm install on ssh:

npm err! git clone --template=/home/vcap/.npm/_git-remotes/_templates --mirror ssh://git@github.xxx.ibm.com/ipaas/lib-account-mgr.git /home/vcap/.npm/_git-remotes/ssh-git-github-xxx-ibm-com-xxx-lib-account-mgr-git-bf65c10c: ssh: not resolve hostname github.xxx.ibm.com: name or service not known 

i expected haven't configured ssh key in bluemix. possible? if not, what's alternative install modules private repo in bluemix?

if downloading private module hosted on git, should able use https protocol (with creds) access it.

there trick avoid issue if not option you:

1) package private modules application (in node_modules)

2) move private modules devdependencies in package.json, rather dependencies, local dev workflow unaffected.

npm install install dependencies , devdependencies. default, bluemix install dependencies

step 2 necessary because if package private node_modules application, staging application fail because npm still tries access private repo validate dependency.

also, if had .cfignore file ignoring entire node_modules directory, have changed ignore public modules.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -