BW Encode - No stdin was piped in

I’m trying to do the “simple” stuff - create a collection and/or item via BitWarden CLI (bw create (item | or-collection)). I can login, unlock it, get items, list items, get templates, all that works without issue, but can’t get the bw encode to work and tried so many things I’ve lost track…

Everything I’ve tried to encode results in the following enigmatic error. e.g. bw get template folder | bw encode

node.exe : No stdin was piped in.
At C:\Users\Shane\AppData\Roaming\npm\bw.ps1:15 char:3
+   & "node.exe"  "$basedir/node_modules/@bitwarden/cli/build/bw.js" $a ...
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (No stdin was piped in.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

[1] Any help resolving the encoding would be appreciated.

[2] Is bw encode required to be able to create items or collections? I don’t know what it actually does. May be I can bypass it?

[3] I cannot get the JSON tool ‘jq’ to work, PowerShell and Command Prompt do not recognize ‘jq’. I think that’s okay, as I think I’m able to create the required JSON string(s) by other means.

Hello @Shane-ds - welcome!

It is not clear from your post what you are trying to do with the CLI, but perhaps the following links will be useful to you:

Cheers!

An update for reference. There was something unknown wrong with my version of Node.js. Updating it seems to have resolved the issue.

Thanks for letting us know, @Shane-ds. Can we mark this post as SOLVED then?

Yeah, resolved.

#15chars#

1 Like