[SOLVED] Sam init fails when trying to add sam pgp public key


Hello everyone,

I’m setting up snips on my Raspberry Pi but now sam init is causing some trouble.
The output is as follows:

Installing Snips Platform components. This may take a few minutes... 

:heavy_check_mark: Updating aptitude repository
:heavy_check_mark: Installing dirmngr
:heavy_check_mark: Adding Snips APT source list
Adding Snips PGP public key
:heavy_multiplication_x: Failed to install platform: Error: ENOENT: no such file or directory, open ‘/usr/local/lib/node_modules/snips-sam/lib/assets/snips-pgp-key.asc’
at Object.openSync (fs.js:450:3)
at Object.readFileSync (fs.js:350:35)
at Function.readFile (/usr/local/lib/node_modules/snips-sam/lib/assets/assets.js:25:24)
at Function.pgpKey (/usr/local/lib/node_modules/snips-sam/lib/assets/assets.js:19:21)
at sshCommandLog.then.then.then._ (/usr/local/lib/node_modules/snips-sam/lib/session/ssh.js:457:64)
at process.internalTickCallback (internal/process/next_tick.js:77:7)


This is a duplicate to this post:

It just wasn’t in the SAM category so I didn’t find it at first. Sorry!
Problem was solved setting snips up manually.


have the same ERROR on comond
sam init.

I use Win 10 and Node.js 10.15.1 LTS



This was a bug in Sam and it was fixed in version 0.0.51
You can update sam with
npm install -g snips-sam