I found the following SO question that seems to suggest some of the npm packages might be using self-signed certificates, causing the error. It seems like the root fix should be with the package itself, using a registered certificate. However, as a workaround for dotCloud, you could use a pre-build hook to run the following command npm config set strict-ssl false
which seemed to work in my testing.
To use this approach you'd do the following:
1) add a prebuild directive to your dotcloud.yml file. Your dotcloud yml file might look like the following:
www:
type: nodejs
approot: app
processes:
app: node app.js
config:
node_version: v0.8.x
prebuild: ./prebuild.sh # <-- prebuild directive
redis:
type: redis
2) add the prebuild.sh file to whereever your application root is. If you don't use an app root, this is just the root of your project.
3) add the following to your prebuild.sh file
#!/bin/bash
npm config set strict-ssl false