Trouble installing cli on MacOS

I’ve been following these instructions to get cli installed on MacOS.

I ran into the EACCES issue in the Troubleshooting section, then ran
sudo chown -R $USER /usr/local/lib/node_modules to fix it.
The next time around I’m getting a different EACCES error.

npm ERR! Error: EACCES: permission denied, symlink ‘…/lib/node_modules/edge-impulse-cli/build/serial-daemon/cli/uploader.js’ -> ‘/usr/local/bin/edge-impulse-uploader’

I also ran sudo chown -R $USER ~/.npm for good measure, but I keep getting the same results.
Any suggestions would be appreciated.

Hi @ctcarroll, If /usr/local/lib/node_modules/edge-impulse-cli/build/ was created you can link manually:

sudo ln -s /usr/local/lib/node_modules/edge-impulse-cli/build/serial-daemon/cli/uploader.js /usr/local/bin/edge-impulse-uploader
sudo ln -s /usr/local/lib/node_modules/edge-impulse-cli/build/serial-daemon/cli/daemon.js /usr/local/bin/edge-impulse-daemon

Otherwise, it seems that /usr/local/bin is owned by root, not by your user. Not sure if that’s a deliberate choice (on my machine /usr/local/bin is owned by me), but I guess you have two options here.


  1. Chown /usr/local/bin in the same way, so npm can link in there.
  2. Install via sudo npm install edge-impulse-cli -g. Although this might screw up some npm permissions.

But thread carefully as these will modify some permissions.