semaphore icon indicating copy to clipboard operation
semaphore copied to clipboard

Unable to get it running

Open rootameen opened this issue 10 years ago • 6 comments

Hey guys.

I wasn't familiar with nodejs before attempting to run this project. Unfortunately the project isn't thoroughly documented on how to get it started for users new to the platform.

Anyhow, I downloaded the files, ran npm installs against dependencies, and as I see on other guides of nodejs apps, I downloaded supervisor and pm2 in order to run the tool.

Unfortunately both seem to fail.

[root@me bin]# supervisor semaphore.js

Running node-supervisor with
  program 'semaphore.js'
  --watch '.'
  --extensions 'node,js'
  --exec 'node'

Starting child process with 'node semaphore.js'
Watching directory '/home/ameen/semaphore-master/bin' for changes.
Press rs for restarting the process.

/home/ameen/semaphore-master/node_modules/bindings/bindings.js:91
  throw err
        ^
Error: Could not locate the bindings file. Tried:
 → /home/ameen/semaphore-master/node_modules/bcrypt/build/bcrypt_lib.node
 → /home/ameen/semaphore-master/node_modules/bcrypt/build/Debug/bcrypt_lib.node
 → /home/ameen/semaphore-master/node_modules/bcrypt/build/Release/bcrypt_lib.node
 → /home/ameen/semaphore-master/node_modules/bcrypt/out/Debug/bcrypt_lib.node
 → /home/ameen/semaphore-master/node_modules/bcrypt/Debug/bcrypt_lib.node
 → /home/ameen/semaphore-master/node_modules/bcrypt/out/Release/bcrypt_lib.node
 → /home/ameen/semaphore-master/node_modules/bcrypt/Release/bcrypt_lib.node
 → /home/ameen/semaphore-master/node_modules/bcrypt/build/default/bcrypt_lib.node
 → /home/ameen/semaphore-master/node_modules/bcrypt/compiled/0.10.36/linux/x64/bcrypt_lib.node
    at bindings (/home/ameen/semaphore-master/node_modules/bindings/bindings.js:88:9)
    at Object.<anonymous> (/home/ameen/semaphore-master/node_modules/bcrypt/bcrypt.js:3:35)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/ameen/semaphore-master/lib/models/User.js:1:76)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at /home/ameen/semaphore-master/lib/models/index.js:12:26
Program node semaphore.js exited with code 8

pm2 isn't any better, it just shows (errored).

I noticed from various files in the project that you run redis and other stuff. Do I need to run these things separately first or it should be automagically ran through your bin file?

Details on how can I kick things off would be much appreciated. Thanks!

rootameen avatar Dec 08 '15 08:12 rootameen

Note: even running node semaphore.js doesn't help:

[root@me bin]# node semaphore.js

/home/ameen/semaphore-master/node_modules/bindings/bindings.js:91
  throw err
        ^
Error: Could not locate the bindings file. Tried:
 → /home/ameen/semaphore-master/node_modules/bcrypt/build/bcrypt_lib.node
 → /home/ameen/semaphore-master/node_modules/bcrypt/build/Debug/bcrypt_lib.node
 → /home/ameen/semaphore-master/node_modules/bcrypt/build/Release/bcrypt_lib.node
 → /home/ameen/semaphore-master/node_modules/bcrypt/out/Debug/bcrypt_lib.node
 → /home/ameen/semaphore-master/node_modules/bcrypt/Debug/bcrypt_lib.node
 → /home/ameen/semaphore-master/node_modules/bcrypt/out/Release/bcrypt_lib.node
 → /home/ameen/semaphore-master/node_modules/bcrypt/Release/bcrypt_lib.node
 → /home/ameen/semaphore-master/node_modules/bcrypt/build/default/bcrypt_lib.node
 → /home/ameen/semaphore-master/node_modules/bcrypt/compiled/0.10.36/linux/x64/bcrypt_lib.node
    at bindings (/home/ameen/semaphore-master/node_modules/bindings/bindings.js:88:9)
    at Object.<anonymous> (/home/ameen/semaphore-master/node_modules/bcrypt/bcrypt.js:3:35)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/ameen/semaphore-master/lib/models/User.js:1:76)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at /home/ameen/semaphore-master/lib/models/index.js:12:26

rootameen avatar Dec 08 '15 08:12 rootameen

After running, rm -Rf node_modules; npm install . The app is working. However, after login it redirects me again to the login page.

note: I'm posting my progress towards fixing the issue so anyone who faces it has an idea if they face the same issues.

rootameen avatar Dec 08 '15 09:12 rootameen

Hi there!

You do need to run redis before hand. I see in the error log that some bindings module can't locate native code. I'd suggest re-installing the node modules and watching for any errors there.

Neither pm2 or supervisor will aid this issue. All they do is keep the node process up (ie if it crashes, it is rebooted).

Install Redis and run it, and let us know how you get on!

matejkramny avatar Dec 08 '15 12:12 matejkramny

hi @matejkramny .. I installed redis on the server and it is currently running.

My problem now is that I see the login page of the application, when I input the default user and password and click login, I can see for a split second that it says "login successful" But then it redirects me again to the login page.

Any idea why this is happening? Thanks!

rootameen avatar Dec 08 '15 12:12 rootameen

Try adding npm-shrinkwrap.json file as per #52 (specific comment)

matejkramny avatar Dec 08 '15 13:12 matejkramny

@matejkramny that worked.

Unfortunately semaphore wasn't as I expected. Documentation isn't clear and getting things off after finishing the installation isn't clear at all.

Thank you for your help though.

rootameen avatar Dec 09 '15 08:12 rootameen