commandstar icon indicating copy to clipboard operation
commandstar copied to clipboard

Ubuntu 14.04 LTS Install

Open Glitch-Goblin opened this issue 12 years ago • 8 comments

Hey, I've been trying to implement your beautiful app on my Starbound server, but have been having issues with the install. I have been tackling the problems piecemeal:

  • installed other parts of nodejs that were not included in the original repository listed in your instructions
  • installed coffeescript components on my server that apparently needed attention, and removed the local script launch line to instead reference the global command
  • (sorry for being vague but I've forgotten many of those details and am quite slow at linux troubleshooting)

I think I have the problem narrowed down to these key factors:

  • node_module/coffeelint will not install. Whenever I run npm install, it reports failures on the coffeelint part of the script.
  • this appears to be due to Ubuntu 14.04's version of coffeescript presenting cake as cake.coffeescript, in order to avoid conflicts with cake-php.
  • there is also an error warning about node.js being renamed to nodejs in Debian, but afaik I have not run into any instances where this would have caused the errors.

From these observations, am I correct in assuming that any call for 'cake' could be replaced with 'cake.coffeescript' in your code? Any suggestions for a quick work around, or list of files where I could apply this change on my server? I fumble around build code. :/ Would love to see this app working on my site as nice as it is on Boundstar!

Glitch-Goblin avatar May 29 '14 10:05 Glitch-Goblin

Are you using NVM to install node? this sounds like ENV stuff. I have a feeling that will help.

All I can really say is that I have had no issues running this software with Ubuntu 12 and my standard node env.

This page is good: http://learn.bevry.me/node/install

This repo is known good, but has some weird configs. https://github.com/digitaldesigndj/commandstar The example: http://boundstar.com/status/

digitaldesigndj avatar May 29 '14 22:05 digitaldesigndj

Here's a page of things I copy and paste to setup a server with commandstar. You might find it useful.

https://gist.github.com/digitaldesigndj/851ec91859e7aed13250

digitaldesigndj avatar May 30 '14 00:05 digitaldesigndj

You are probably on the right track with nvm... I skipped that part since the nodejs link you provided advised Ubuntu users to just use the apt-get repository. Part of the npm install error does mention a not found env/bin folder! I will try this when I get to a proper workstation, my 3G connection is too shaky right now. :)

Glitch-Goblin avatar May 30 '14 02:05 Glitch-Goblin

Alright, I've went at it again, and here is the wall where I am currently stumped:

userer@username:~/commandstar$ ./runServer.sh
Installing/updating dependencies...
TypeError: Cannot read property 'checkFrequency' of null
  at Object.<anonymous> (/home/userer/commandstar/lib/commandstar.coffee:69:3, <js>:43:40)
  at Object.<anonymous> (/home/userer/commandstar/lib/commandstar.coffee:1:1, <js>:261:4)
  at Module._compile (module.js:456:26)

Interestingly, when I run as root, (which I obviously don't want to do on a regular basis), I get this:

userer@username:~/commandstar$ sudo ./runServer.sh
[sudo] password for userer: 
Installing/updating dependencies...
/usr/bin/env: node: No such file or directory

It seems like I must have missed something simple but I can't for the life of me figure out what.

So this time I am using the local coffee-script (which is the correct version, turns out Ubuntu 14.04's coffee-script is a few updates late), have installed node manager / nvm and used that to install node.js (in place of the Ubuntu version, which was removed), of course re-ran npm install in the commandstar folder every time I made changes.... all the node_modules seem to check out. Dah!

Glitch-Goblin avatar May 30 '14 14:05 Glitch-Goblin

just try npm install then ./node_modules/coffee-script/bin/coffee lib/commandstar.coffee to use the local coffeescript to run things.

On Fri, May 30, 2014 at 9:30 AM, atomfenrir [email protected] wrote:

Alright, I've went at it again, and here is the wall where I am currently stumped:

userer@username:~/commandstar$ ./runServer.shInstalling/updating dependencies...TypeError: Cannot read property 'checkFrequency' of null at Object. (/home/userer/commandstar/lib/commandstar.coffee:69:3, :43:40) at Object. (/home/userer/commandstar/lib/commandstar.coffee:1:1, :261:4) at Module._compile (module.js:456:26)

Interestingly, when I run as root, (which I obviously don't want to do on a regular basis), I get this:

userer@username:~/commandstar$ sudo ./runServer.sh[sudo] password for userer: Installing/updating dependencies.../usr/bin/env: node: No such file or directory

It seems like I must have missed something simple but I can't for the life of me figure out what.

So this time I am using the local coffee-script (which is the correct version, turns out Ubuntu 14.04's coffee-script is a few updates late), have installed node manager / nvm and used that to install node.js (in place of the Ubuntu version, which was removed), of course re-ran npm install in the commandstar folder every time I made changes.... all the node_modules seem to check out. Dah!

— Reply to this email directly or view it on GitHub https://github.com/seriallos/commandstar/issues/22#issuecomment-44657035 .

digitaldesigndj avatar May 30 '14 14:05 digitaldesigndj

Yeah, I was already running the local coffee-script and getting those errors though. After ruthless package management, up to and including back versioning "zeparser" in node-modules from 0.0.7 to 0.0.5, I found that none of that had much of anything to do with my problems! If only I knew how to pay attention to error reports! It seems the problem was actually with coffee interpreting the commandstar.coffee script. I had to comment out a line on the "ServerStatus" block regarding frequency of checks, (I'm not using that function, anyway), and I am finally getting high level script errors!! Yes!! :grinning:

Now, this could have been from my own erroneous editing of the commandstar config way back when I first started tinkering... That seems like the most plausible cause for the parse errors, anyway.

My (possibly) last problem appears to be getting the script to recognize my home folder:

userer@username:~/commandstar$ ./runServer.sh
Installing/updating dependencies...
CommandStar listening on port http://0.0.0.0:8080
{ message: 'Unable to read config file: Error: ENOENT, open \'~/starbound/starbound.config\'',
  cause: 
   { [Error: ENOENT, open '~/starbound/starbound.config']
     errno: 34,
     code: 'ENOENT',
     path: '~/starbound/starbound.config' } }

I noticed the Boundstar config used /root/starbound and I've tried a bunch of variations using ~, /~, etc, but can't seem to get a lock. Only asking about this part because I'm exhausted and about to go to bed. :sleepy:

As far as the repository "issue" goes, I guess I could contribute some tips for Trusty Tahr users tomorrow (and after I've confirmed I have it working, of course.)

Glitch-Goblin avatar May 30 '14 17:05 Glitch-Goblin

Sorry, github noob. Still working on getting this up and running on my server - appears to be a permissions issue at this point.

Glitch-Goblin avatar May 31 '14 19:05 Glitch-Goblin

Well, I've got Commandstar working on my Ubuntu 14.04 (see http://atomfenrir.com:3333). All I can really tell at this point was maybe that the Ubuntu repositories were interfering.... my advice to any Ubuntu installers would be to ignore and even remove related apt-get repositories... ie.... coffee-script, nodejs, etc, as they turned out to be older versions and sometimes even modified to have different command names. Considering issue closed. :)

Glitch-Goblin avatar Jun 09 '14 19:06 Glitch-Goblin