calzoneman / sync

Node.JS Server and JavaScript/HTML Client for synchronizing online media
Other
1.47k stars 232 forks source link

npm install #146

Closed therealMRBK closed 11 years ago

therealMRBK commented 11 years ago

I'm havin issues installing cytube. After npm install i get this error:

mysql-libmysqlclient@1.5.2 install /var/www/vhosts/_/httpdocs/sync/node_modules/mysql-libmysqlclient node-gyp rebuild gyp ERR! configure error gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead gyp ERR! stack at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:69:16) gyp ERR! stack at Object.self.commands.(anonymous function) as install gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:219:20) gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:105:9 gyp ERR! stack at ChildProcess.exithandler (child_process.js:635:7) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack at maybeClose (child_process.js:735:16) gyp ERR! stack at Socket. (child_process.js:948:11) gyp ERR! stack at Socket.EventEmitter.emit (events.js:95:17) gyp ERR! stack at Pipe.close (net.js:451:12) gyp ERR! System Linux 2.6.32-042stab055.12 gyp ERR! command "node" "/usr/local/lib/node_modules/npm/nodemodules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /var/www/vhosts//httpdocs/sync/node_modules/mysql-libmysqlclient gyp ERR! node -v v0.10.8-pre gyp ERR! node-gyp -v v0.9.5 gyp ERR! not ok npm ERR! weird error 1 npm http 304 https://registry.npmjs.org/bindings/1.0.0

calzoneman commented 11 years ago

I see that you're using node v0.10.8-pre; it's possible the library I'm using isn't yet updated to that version. Try using a stable version of nodejs (http://nodejs.org lists v0.10.7 as the current version)

calzoneman commented 11 years ago

Perhaps this will help: http://stackoverflow.com/questions/12947145/error-pre-versions-of-node-cannot-be-installed-use-the-nodedir-flag-instea

therealMRBK commented 11 years ago

I deleted my previous installation and installed nodejs with this way:

sudo apt-get update sudo apt-get install python-software-properties python g++ make sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs

Now it seems to work. I'll edit my post

therealMRBK commented 11 years ago

ok the issuie seems to last.

calzoneman commented 11 years ago

Can you try downloading and building node from source? I've done it that way on many different systems (Arch, Debian 6, Debian 7, CentOS 6, Ubuntu) with no problems.

calzoneman commented 11 years ago

Slight correction, it also works when I install the node package from the Arch repos.

calzoneman commented 11 years ago

Actually, can you try installing it in a directory that isn't owned by root (you can later copy the files to /var/www/whatever if you so desire)? I'm wondering if it's an issue with permissions/path.

therealMRBK commented 11 years ago

Ok I uninstalled node and npm completely and then got it with

apt-get install nodejs

after that everything worked flawless and it installed.

Now if i try to create a channel, it redirects me to the channel-view, but I can't register/login/add videos or do anything else.

calzoneman commented 11 years ago

If you're trying to serve the HTML/JS/CSS content from Apache (which I discourage, because I have better control over the internal webserver, but I understand some people want to use it), read through this: https://github.com/calzoneman/sync/issues/134#issuecomment-18121460

therealMRBK commented 11 years ago

That didn't help. The site doesn't work if i browse it with the port either. I've installed it on a fresh vserver and had the same problem.

calzoneman commented 11 years ago

Make sure you've followed all the steps in https://github.com/calzoneman/sync/wiki/Installing. If you're getting a blank channel page then your websocket isn't connecting, which means either the server is improperly configured, the client is improperly configured, or some sort of firewall is blocking the port you use.

therealMRBK commented 11 years ago

Ok, I'll describe my problem:

I followed the instructions and made EVERYTHING exactly like mentioned in the guide. I got a Ubuntu 12.04 Server.

config.js looks like this:

exports.MYSQL_SERVER = "localhost"; exports.MYSQLDB = ""; exports.MYSQLUSER = ""; exports.MYSQL_PASSWORD = "*"; exports.IO_PORT = 1338; // Socket.IO port, DO NOT USE PORT 80. exports.WEBSERVER_PORT = 1337; // Webserver port. Binding port 80 requires root permissions exports.MAX_PER_IP = 10; exports.GUEST_LOGIN_DELAY = 60; // Seconds

and the iourl.js like this:

var IO_URL = "http://mydomain:1338"; var WEB_URL = "http://mydomain:1337";

now when I run the Server with run.sh, I can connect to the site with http://mydomain:1337 If I enter a Channel, we'll name it test, then it takes me to http://mydomain:1337/r/test - But it doesn't add the channel in the mySQL Server. It looks like this: unbenannt Here I can't klick any button. None of them are working.

I tested this installation on 3 Servers ! And on all the threee I had the same problem.

Maybe I need some packages I don't have ?

therealMRBK commented 11 years ago

Now it just worked like it's magic...I only githubed v8 Javascript Engine o0 Well, this can be closed now :) Thank you for your help !