0

I accidently upgraded my Node server and it broke some stuff.

I'm using robot-js that only supports these versions of node - https://github.com/Robot/robot-js-binaries/tree/gh-pages/addon/1.0.2

How do I erase my current version and install the darwin-x64-14.node one?

I can't quite figure out the right command to install node-darwin-x64. What version do I put in?

https://www.npmjs.com/package/node-darwin-x64#download

Morgan Allen
  • 3,291
  • 8
  • 62
  • 86
  • Possible duplicate of [How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)](https://stackoverflow.com/questions/11177954/how-do-i-completely-uninstall-node-js-and-reinstall-from-beginning-mac-os-x) – Scott Stensland Jun 02 '18 at 19:25
  • Hey @ScottStensland I'm trying to understand what command do I use to install that version. – Morgan Allen Jun 02 '18 at 19:35
  • keep in mind that npm always comes bundled together with node so focus on uninstalling then installing node – Scott Stensland Jun 02 '18 at 20:26

1 Answers1

0

I personally prefer to use nvm instead of directly installing node.js it allow me to change any version of node instantly.

you can find a detailed instruction of how to uninstall node here.

then install nvm

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash

then to install a specific version of node just use

nvm install any-version

to change to a specific node installation

nvm use version

please for osx installation refer to the Important Notes section on their readme https://github.com/creationix/nvm

miqe
  • 3,209
  • 2
  • 28
  • 36
  • ha, yea I don't understand what version it is? is it like a different type of node server? im so confused – Morgan Allen Jun 02 '18 at 19:44
  • i guess you are looking for `0.12.13` i just looked into https://github.com/Robot/robot-js-binaries/blob/gh-pages/addon/1.0.2/build_info.json and in the darwin i saw `"nodeVersion": "0.12.13"` – miqe Jun 02 '18 at 19:49
  • 1
    @MorganAllen NVM is a tool for managing versions of Node.js on your system. The version of NVM itself doesn't matter (in this case). Remove the node that is currently installed in the system and install NVM instead. Using NVM you'll be able to install (and change whenever you need) between different versions of node.js on your system (e.g. different versions of node for different projects). – Michal Jun 02 '18 at 20:24
  • this is weird. I got `0.12.13` installed but getting the error `SyntaxError: Use of const in strict mode.` which sounds like this was developed for `4.0.0` version of node or later? where can I see exactly what version of node it is expecting? – Morgan Allen Jun 02 '18 at 21:09
  • I figured it out! I downloaded and put the `nodedarwin-x64-48.node` file in the folder – Morgan Allen Jun 02 '18 at 21:21