Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get it running #53

Closed
rootameen opened this issue Dec 8, 2015 · 6 comments
Closed

Unable to get it running #53

rootameen opened this issue Dec 8, 2015 · 6 comments

Comments

@rootameen
Copy link

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
Copy link
Author

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
Copy link
Author

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.

@matejkramny
Copy link
Contributor

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!

@rootameen
Copy link
Author

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!

@matejkramny
Copy link
Contributor

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

@rootameen
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants