Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an problem with my NodeJS app. The problem is the include of the library Hashlib I've followed more than 10 times the instructions to install. Get a clone of the repo, do make and make install. NodeJS is installed in default path, and that's the tricky point:

When I launch node app.js it works, perfectly.

The problem starts when I configured my Supervisord to run with the same user, with the same config file as I have in other systems working, and I get that NodeJS can't find hashlib.

module.js:337
    throw new Error("Cannot find module '" + request + "'");
      ^
Error: Cannot find module 'hashlib'

I'm getting crazy, what can I do?! Why my user launching node from the console works great, but not the supervisord?

Thanks!

share|improve this question
    
I tried to change the hashlib.node permisions and nothing happened, but what I've done is to move the .npm/node_modules/hashlib.node to the /var/www/node_modules/hashlib.node and it works. –  enedebe Sep 9 '12 at 14:43
add comment

1 Answer 1

up vote 1 down vote accepted

The makefile for hashlib is wrong. It installs the library with the 'cp' command instead of the 'install' command, so permissions will not be set correctly. Fix the permissions on file hashlib.node.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.