Problem with installing Discourse

Hi all,

I’m currently using MacOS. I am following the beginner’s guide to install Discourse and I ran into an error here with the installation of Yarn. Can someone provide any insight or hints on how to proceed? Thank you!

Hey @ac7378, that may be because of your npm version is not compatible. So, you can try re-installing it.

Step 1: Update Homebrew

$ brew update

Step 2: Remove node/npm everywhere on your system

Some of these commands are not necessary depending on how you installed node/npm in the past.

$ brew uninstall npm
$ brew uninstall node
$ npm uninstall npm -g
$ sudo rm -rf /usr/local/lib/node_modules

Note: I had stray node files that I found by running brew -v link node (which gave me the verbose output of the linking errors brew was complaining about). You may need to:

$ sudo rm -rf /usr/local/include/node
$ sudo rm -rf /usr/local/lib/node

Step 3: Open a new terminal and install node

$ brew install node