tinderjs / tinder-desktop

Use Tinder from your desktop, for Mac OS X, Microsoft Windows and Linux
https://tinderjsblog.herokuapp.com/
97 stars 25 forks source link

Build fails on Ubuntu 64-bit (and likely others) #141

Closed Traumflug closed 8 years ago

Traumflug commented 8 years ago

Just gave this nice project a try, but unfortunately I didn't get far:

sudo apt-get install nodejs npm
[...]
cd
git clone https://github.com/tinderjs/tinder-desktop.git
cd tinder-desktop
npm install

After downloading a number of packages, it stops with this error message:

~/tinder-desktop$ npm install

> electron-prebuilt@0.37.8 postinstall /home/mah/tinder-desktop/node_modules/electron-prebuilt
> node install.js

sh: 1: node: not found
npm WARN optional Skipping failed optional dependency /gulp-appdmg/appdmg:
npm WARN notsup Not compatible with your operating system or architecture: appdmg@0.3.10
npm ERR! Linux 4.4.0-23-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! electron-prebuilt@0.37.8 postinstall: `node install.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the electron-prebuilt@0.37.8 postinstall script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs electron-prebuilt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls electron-prebuilt
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/mah/tinder-desktop/npm-debug.log
[1]+  Done                    gitk --all  (wd: ~/tinderplusplus)
(wd now: ~/tinder-desktop)

This is the log file (extension added to satisfy Github) npm-debug.log.txt

Being a command line (and Makefile, Assembly, C, Bash) savy user I don't mind building from sources, but nodejs/npm isn't exactly my area of expertise. What does the above error message mean? Any idea on how to fix this?

OS is Ubuntu 16.04 LTS AMD64, equipped with 4 GiB RAM and 44 GiB disk space left.

mayeaux commented 8 years ago

Do you have nodejs installed?

run1t commented 8 years ago

to use nodejs on ubuntu you have to do a symlink on the nodejs binary, take a look a this : http://stackoverflow.com/questions/18130164/nodejs-vs-node-on-ubuntu-12-04?answertab=votes#tab-top

mayeaux commented 8 years ago

It looks like the script is failing because it's calling node install.js whereas with Ubuntu node is distributed as nodejs. Maybe add a symlink

mayeaux commented 8 years ago

Haha you beat me to it by literally two seconds @run1t

Traumflug commented 8 years ago

Thanks for the hint, very appreciated! So I did this and it appears to work even less:

$ ln -s /usr/bin/nodejs /home/mah/Linux/bin/node
~/tinder-desktop$ ls -l /home/mah/Linux/bin/node
lrwxrwxrwx 1 mah mah 15 Jun  8 22:55 /home/mah/Linux/bin/node -> /usr/bin/nodejs
~tinder-desktop$ which node
/home/mah/Linux/bin/node
~/tinder-desktop$ node --version
v4.2.6
~/tinder-desktop$ node .
module.js:328
    throw err;
    ^

Error: Cannot find module '/home/mah/tinder-desktop'
    at Function.Module._resolveFilename (module.js:326:15)
    at Function.Module._load (module.js:277:25)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3
Traumflug commented 8 years ago

Stupid me, node . was the wrong attempt, of course. Finally the process completed with this sequence:

ln -s /usr/bin/nodejs /home/mah/Linux/bin/node
npm install bower
npm install
npm install gulp-cli
node_modules/.bin/gulp

At this point it occured to me that I forgot to pass 'run' to gulp. But instead of an error message I got a window asking for a Facebook login. This means the app is running properly, right?

Anyways, thanks for your help. Perhaps the above sequence find its way into the Readme on the project title page :-)

run1t commented 8 years ago

If you have the facebook login, it's good. You're right we should add this sequence in the readme. I'll probably do that tomorrow !