Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

CCL1043-K21: Error when scaffolding the component

Ryan Magsam1
Mega Guru

I've went through the steps of installing the ServiceNow CLI, but get this error when I try to scaffold a new UI component.

Command: snc ui-component project --name now-experience-dashboard --description "My First NXF component built at CreatorCon"

Error: Cannot find module 'keytar'

Require stack:

- ~/.snc/.extensions/ui-component/node_modules/@servicenow/cli-glide/connection/auth/credential-manager/keytar-synthesizer.js

I'm running macOs Catalina

I'm running nodeJs version 12.19.0.

I see a version discrepancy with the SNC CLI.  The lab says the current version should be 19.0.0, however the command "snc version" shows that I have version 1.1.0. I just downloaded and installed today, so I'm pretty sure I have the latest version.

Thanks for any help!

Ryan

1 ACCEPTED SOLUTION

Ryan Magsam1
Mega Guru

I found an answer in an older community post.

 

Can simply install the keytar package to resolve.

npm i keytar

But now I have a new error. It seems this lab is more of an exercise in using Now Community.  😄

View solution in original post

11 REPLIES 11

Inespolo
Tera Contributor

Thank you for sharing the solution

Xander H
ServiceNow Employee

Reposting this from my reply in https://community.servicenow.com/community?id=community_question&sys_id=4deca8de1beb4454fff162c4bd4bcbe0:

To anyone experiencing this in 2021 onwards with ServiceNow CLI (the new one), already using node 12 and still running into this error...

I fixed it by going into the ui-component extension folder, then installing keytar@5.0.0 (as required) manually:

$ cd ~/.snc/.extensions/
$ npm install keytar@5.0.0
$ smr snc ui-component --help              

Usage:  <cmd> [args]
For help, run: <cmd> --help
...

It works after!