pb-node | Pandorabots API module for Node.js
kandi X-RAY | pb-node Summary
kandi X-RAY | pb-node Summary
Pandorabots API module for Node.js
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of pb-node
pb-node Key Features
pb-node Examples and Code Snippets
Community Discussions
Trending Discussions on pb-node
QUESTION
cf version
cf version 6.37.0+a40009753.2018-05-25
Buildpack version Manifest ...ANSWER
Answered 2018-Jun-27 at 14:05There's a lot of info here and I'm not sure it's all relevant. It seems that the crux of your problem is that when your application is staged (i.e. when the buildpack runs), the buildpack runs npm install
which in turn tries to grab a dependency from a private github repo.
Assuming I've got that correct...
One possible solution would be to vendor your dependencies. When you "vendor" dependencies, you're basically running
npm install
locally or in some environment you control, then you're sending the dependencies up with your application to Cloud Foundry. It makes for a larger application, but when your application stages and the platform runsnpm install
all the dependencies exist already sonpm install
becomes basically a no-op.The main trick is with compiled dependencies. To make this work, you need to vendor your dependencies on a system that matches the rootfs on Cloud Foundry. Currently the
cflinuxfs2
stack matches Ubuntu Trusty 14.04.You can read more about vendoring dependencies in the docs here.
https://docs.cloudfoundry.org/buildpacks/node/index.html#vendoring
Another solution would be to use
cf local
. This is acf
cli plugin that uses Docker to run buildpacks on your local system. On the local system, you'd presumably be able to access your private repository (it's basically running from your laptop/PC). The buildpack would then run and create a completely self-contained droplet. You can then usecf local
to export that droplet & send it to any other Cloud Foundry platform.The beauty is that the droplet is everything that's needed for the platform to run your app, so it doesn't even need to stage your application which bypasses the who problem of accessing your private code from the staging environment on the public Cloud Foundry.
The other thing you might be able to do, and I'm not 100% sure this will work, is to include a
.npmrc
file. The buildpack should configurenpm
to look at this file when it runsnpm install
. The idea here would be to include some configuration option tonpm
that would allow it to connect to your repo. I'm not an expert withnpm
though, so I don't know if such an option exists. Just thought I'd mention this in case it might help.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pb-node
No Installation instructions are available at this moment for pb-node.Refer to component home page for details.
Support
If you have any questions vist the community on GitHub, Stack Overflow.
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page