RanvierMUD / ranviermud

A node.js based MUD game engine
https://ranviermud.com
MIT License
796 stars 247 forks source link

Even more stupid-proofing for try it out quickly on Ubuntu #308

Closed montsamu closed 5 years ago

montsamu commented 6 years ago

Description

Literally following the "try it out quickly" steps has two problems:

1.

npm install -> the stupid user did not actually have node.js installed; this one is easy even for stupid people as ubuntu guesses what they did wrong and prompts them to run:

sudo apt install npm

2.

./ranvier /usr/bin/env: node: No such file or directory

The stupid user did not expect npm install on ubuntu not to include the "node" command but it actually doesn't, because the "node" command is already claimed by an old Amateur Packet Radio Node program. (No, seriously.)

The user can mitigate this by either:

A. editing ranvier and changing "node" to "nodejs" in line 1 B. sudo apt install nodejs-legacy

Expected outcome

Even a stupid user can get "try it out quickly" to run.

Actual outcome

The stupid user does not quite understand why ./ranvier gives the error about "node" or immediately how to fix it.

Steps to reproduce

On a shiny new Ubuntu server try to follow "try it out quickly". See that npm install doesn't work (until the stupid user installs npm). Then see that ./ranvier does not work as "node" is not a valid command in their path.

Version of Ranvier

./ranvier --version /home/ubuntu/ranviermud/src/Account.js:129 const { ^

SyntaxError: Unexpected token { at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:374:25) at Object.Module._extensions..js (module.js:417:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Module.require (module.js:354:17) at require (internal/module.js:12:17) at Object. (/home/ubuntu/ranviermud/src/AccountManager.js:4:17) at Module._compile (module.js:410:26) at Object.Module._extensions..js (module.js:417:10)

shawncplus commented 6 years ago

The stupid user did not expect npm install on ubuntu not to include the "node" command but it actually doesn't, because the "node" command is already claimed by an old Amateur Packet Radio Node program. (No, seriously.)

I'm not sure what flavor of Ubuntu you're using but I'm on 14.04 and I definitely have node installed to node, not nodejs. Are you sure this isn't just because you have some custom apt repository setup?

montsamu commented 6 years ago

I'm on 16.04 -- I think it was actually because I was using the incredibly old version of nodejs that apt-get install npm pulls in there. Needed to do a proper install using:

https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

(This "issue" can probably more properly be folded into "read the requirements and install the appropriate nodejs version first.)

seanohue commented 6 years ago

Could be solved for Ubuntu and various other platforms by linking to a set of NodeJS install instructions (perhaps just the Node website?)