Skip to content

Instantly share code, notes, and snippets.

@pdc
Created February 28, 2014 10:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pdc/9269038 to your computer and use it in GitHub Desktop.
Save pdc/9269038 to your computer and use it in GitHub Desktop.
My Heroku deployment script installs LESS via NPM and is having trouble!
#!/usr/bin/env bash
set -eo pipefail
if [ -x .heroku/python/bin/lessc ]; then exit; fi
npm install -g less
-----> Running install_nodejs
-----> Running install_lessc
npm http GET https://registry.npmjs.org/less
npm ERR! Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN
npm ERR! at ClientRequest.<anonymous> (/app/.heroku/vendor/node/lib/node_modules/npm/node_modules/request/main.js:525:26)
npm ERR! at ClientRequest.g (events.js:193:14)
npm ERR! at ClientRequest.EventEmitter.emit (events.js:93:17)
npm ERR! at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1462:7)
npm ERR! at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:111:23)
npm ERR! at CleartextStream.socketOnData [as ondata] (http.js:1367:20)
npm ERR! at CleartextStream.CryptoStream._push (tls.js:526:27)
npm ERR! at SecurePair.cycle (tls.js:880:20)
npm ERR! at EncryptedStream.CryptoStream.write (tls.js:267:13)
npm ERR! at Socket.ondata (stream.js:38:26)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Linux 3.8.11-ec2
npm ERR! command "/app/.heroku/python/bin/node" "/app/.heroku/python/bin/npm" "install" "-g" "less"
npm ERR! cwd /app
npm ERR! node -v v0.8.12
npm ERR! npm -v 1.1.63
npm ERR! code ESSL
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /app/npm-debug.log
npm ERR! not ok code 0
@pdc
Copy link
Author

pdc commented Feb 28, 2014

I realized after posting this that part of the problem is that the test used in the script to avoid installing LESS if it is already present is wrong – it fails because the -x (executable) option does not return true for symbolic links to executables. Having fixed this the npm command is no longer being called & I can get on with deploying changes.

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