The Now Platform® Washington DC release is live. Watch now!

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error when installing Now-CLI Components (Mac OS Mojave)

James164
Tera Contributor

Hi all,

Further to this community post, i'm getting errors when trying to install the Now Experience CLI on my Mac (Mojave).

After installing the packages via a root shell:

sudo -i
npm install @servicenow/cli -g

And then running:

now-cli --help

I get an error showing up in the terminal that starts with:

Error: Cannot find module 'keytar'
node -v
v12.13.0

npm --version
6.13.4

which node
/usr/local/bin/node

which npm
/usr/local/bin/npm

which now-cli
/usr/local/bin/now-cli

A solution suggested in the previously mentioned community post says to unmask and alter permissions but i'm struggling with this.

Is this a known problem or specifically a problem with my machine?

2 REPLIES 2

tomashrobarik
Kilo Guru

I actually had the same issue on macbook with macOS Catalina. I then tried the setup process on a fresh macbook by starting with installation of the nvm (https://github.com/nvm-sh/nvm). It allows you to run multiple nodejs versions and should install it for your user profile without requiring admin rights. After that I didn't encounter the issue with missing module. Another option might be trying to install keytar:

npm i -g keytar

Also note, that the offical docs are saying that they are supporting the 12.16.1 version of nodejs. Might be worth a try to update it to the latest LTS version as well.

DirkRedeker
Mega Sage

Hi

I had the same issue and played around with the access rights, but before I completely mixed and messed up my MacBook, I just installed the "now-cli" locally (not "GLOBALLY").

This way, you just install it by omitting the "-g" switch.

That worked perfect for me.

Let me know if that answers your question and mark my answer as correct and helpful.

BR

Dirk