Skip to content

Instantly share code, notes, and snippets.

@gnowland
Created September 12, 2019 22:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gnowland/29d362921e455c8f87b54d7652a2eedf to your computer and use it in GitHub Desktop.
Save gnowland/29d362921e455c8f87b54d7652a2eedf to your computer and use it in GitHub Desktop.
When node is giving you macos firewall trouble
# https://github.com/tj/n/issues/394#issuecomment-359570847
# remove current entry in firewall
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --remove /usr/local/bin/node && \
# copy current node from n
cp -pf /usr/local/n/versions/node/$(node -v | cut -d 'v' -f 2)/bin/node /usr/local/bin && \
# add to firewall
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/local/bin/node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment