Thursday 20 September 2018

Is there no best practice way to install Node?

Okay, let me preface with a bit of backstory. (I'm running mac OS High Sierra)Back a month or two ago, I decided to install npm and node with Homebrew. That's right, I installed a package manager with a package manager. I had no idea the headache this would cause.I uninstalled my Node and NPM versions that I had downloaded from the official disk image on the Node.js website (following these steps https://ift.tt/2PSpP3q), installed them both via brew, and was happily on my way.Well, I knew very little about running globally installed NPM packages on a Node binary installed by Homebrew. I ran sass to compile some stupid web project CSS I was working on and ended up literally crashing my computer. I almost had to reformat my disk and reinstall mac OS.So, I went ahead and somehow fixed everything, realized the philosophical problems behind installing NPM with Homebrew, and stuck my official Node.js disk image installation. I've never had any symlink issues since.Fast forward to now.I am trying to now install nasm via Homebrew, and I'm honestly terrified to move forward.I ran brew doctor and have about 200 or so unlinked header files all contained in /usr/local/include/node/*/Brew is prompting me to either 1. run brew install node (no thanks) 2. run brew pruneIs brew prune going to break anything?The output of my current which node and which npm is /usr/local/bin/node and /usr/local/bin/npmI don't want these unused Node headers just sitting there, it feels dangerous. If anyone has any recommendations, that would be much appreciated.Also, I'm planning on getting a new computer soon (a newer Macbook Pro). Is there a "best practice" to install node? Maybe install nvm via homebrew and then install node through nvm? I'm doubting myself because I read the first answer to this SO post: https://ift.tt/2xs7YcO help is greatly appreciated!

Submitted September 21, 2018 at 05:29AM by mjvolk

No comments:

Post a Comment