Can't seem to run CLI install script on M1 Mac using zsh

Any ideas why zsh doesn’t like the install script

./ line 7: syntax error near unexpected token `)'
./ line 7: `		-u|--update-all) UPDATE="true"'

@derrallg I guess the parameter parsing is bash specific (although the script should run through bash anyway) (@jenny).

Can you just run:

/bin/bash ./  


It still gave the same error.

My understanding was that since the script had #!/usr/bin/env bash at the beginning it should still work with zsh.

Thanks Jan for the suggestion. I think I’m going to keep working from my Mac Mini Intel machine which I’ve been doing the tutorials on without a problem and shelve the ARM machine for now. I’ve not had a smooth transition so far.

1 Like

@derrallg Anyway, for macOS easiest is just to run:

npm install edge-impulse-cli -g

After installing Node, and that should work on both M1 and x86.

with "npm install edge-impulse-cli -g " its dosent work!
getting error like:
npm ERR! code EACCES

npm ERR! syscall mkdir

npm ERR! path /usr/local/lib/node_modules/edge-impulse-cli

npm ERR! errno -13

npm ERR! Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/edge-impulse-cli’

npm ERR! [Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/edge-impulse-cli’] {

npm ERR! errno: -13,

npm ERR! code: ‘EACCES’,

npm ERR! syscall: ‘mkdir’,

npm ERR! path: ‘/usr/local/lib/node_modules/edge-impulse-cli’

npm ERR! }

npm ERR!

npm ERR! The operation was rejected by your operating system.

npm ERR! It is likely you do not have the permissions to access this file as the current user

npm ERR!

npm ERR! If you believe this might be a permissions issue, please double-check the

npm ERR! permissions of the file and its containing directories, or try running

npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/animeshkumarnayak/.npm/_logs/2022-04-03T07_58_43_440Z-debug.log

Hello @animesh12 ,

EACCES: permission denied, this is indication that the node_modules is not owned by you, but rather by root. This is probably not what you want.

To fix this, run:

sudo chown -R $USER /usr/local/lib/node_modules