Resolving Error: Cannot find module '../build/Release/keytar.node'
While trying to get started with local development of custom Next Experience components I ran into the following issue after installing the ServiceNow CLI and the
Error: Cannot find module '../build/Release/keytar.node'
What I ended up doing is the following:
npm i -g @servicenow/cli
If already installed you can uninstall the
ui-component as follows:
snc extension remove --name ui-component
And then reinstall it like this:
snc extension add --name ui-component
npm install email@example.com
You can uninstall NVM by running the following command3:
rm -rf $NVM_DIR ~/.npm ~/.bower
And you can reinstall the latest version by copy pasting the curl command with the latest version from this Github repository (opens in a new tab). As of this writing the curl command is as follows:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash