Repository navigation
Closed
Description
Extension – Bitwarden
Author: @pomdtr
Description
Can't run the Bitwarden extension. I keep getting the Something went wrong error upon running it.

Error log pasted below:
Error: Command failed with exit code 1: /usr/local/bin/bw status
/usr/local/Cellar/bitwarden-cli/1.20.0/libexec/lib/node_modules/@bitwarden/cli/node_modules/webidl-conversions/lib/index.js:357
} catch {
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/Cellar/bitwarden-cli/1.20.0/libexec/lib/node_modules/@bitwarden/cli/node_modules/whatwg-url/dist/URL.js:3:21)
/usr/local/Cellar/bitwarden-cli/1.20.0/libexec/lib/node_modules/@bitwarden/cli/node_modules/webidl-conversions/lib/index.js:357
} catch {
^
SyntaxError: Unexpected token {
createScript:vm.js:80:10
Object.runInThisContext:vm.js:139:10
Module._compile:module.js:617:28
Object.Module._extensions..js:module.js:664:10
Module.load:module.js:566:32
tryModuleLoad:module.js:506:12
Function.Module._load:module.js:498:3
Module.require:module.js:597:17
require:module.js:11:18
Object.<anonymous>:URL.js:3:21
Lr:search.js:6:57
search.js:6:10106
processTicksAndRejections:task_queues:96:5
async ke.status:search.js:11:1364
async r:search.js:6:12621
Steps To Reproduce
- Download Bitwarden extension
- Install Bitwarden CLI
- Try running any of the Bitwarden extension commands
The current behavior
I can't run the extension because of the error posted above.
The expected behavior
Should be able to run the extension and its commands without any issues.
Raycast version
Version: 1.26.2
Activity
pomdtr commentedon Dec 10, 2021
Hi, it looks like an issue with the bitwarden cli itself. Can you
bw statusin your terminal and see if the same error is printed ?jurildd commentedon Dec 10, 2021
Hey @pomdtr, I'm not getting the error with the
bw statuscommand. I've also tried using the bw cli itself and it seems to be working fine.pomdtr commentedon Dec 16, 2021
I must admit I'm not a javascript expert so the traceback is not really helpful to me. Can you run
node --versionandwhich nodein your terminal and write the result here?It looks like a syntax issue to me, so the node version used by the extension is node compatible with the cli.
I think we should be able to resolve this by allowing the user to specify the path of it's node install.
jurildd commentedon Dec 17, 2021
@pomdtr I'm using v12
pomdtr commentedon Dec 17, 2021
Thanks, I'll experiment with that !
zhanang19 commentedon Dec 24, 2021
@pomdtr I had the same issue here.
Here is the error log in my side:
Additional notes:
node version: v14.18.1
node path:
/Users/[username]/.nvm/versions/node/v14.18.1/bin/nodebw version: 1.20.0
bw path:
/usr/local/bin/bwHope this detail can help you to trace the issue.
CryogenicPlanet commentedon Jan 2, 2022
@pomdtr Any updates on this?
It was working fine when the extension installed and was using node 17, but I removed that and installed node 16 with
nvmand now it doesn't workpomdtr commentedon Jan 2, 2022
Yeah the main issue here is that the bw cli is not contained and depends on having the node binary available in the brew install folder. The bw cli is kind of a pain to work with, I'm considering switching to rbw (an unofficial bitwarden cli).
pomdtr commentedon Jan 2, 2022
@CryogenicPlanet Did you install the bitwarden-cli using brew or npm directly ?
CryogenicPlanet commentedon Jan 2, 2022
@pomdtr From brew. Would it work if I uninstalled and reinstalled from npm?
Also the cli works fine if I call it myself for the terminal
pomdtr commentedon Jan 2, 2022
No brew is supposed to work. Can you give me the output of the following command ?
ls -l /usr/local/bin/ | grep Cellar/nodels -l /opt/homebrew/bin | grep Cellar/nodeIf you have uninstalled the node executable on brew, the cli works fine in your terminal because it has access to your PATH, but my extension only search node in
/usr/local/bin/and/opt/homebrew/bin.pomdtr commentedon Jan 2, 2022
@jurildd @zhanang19 @CryogenicPlanet
I added the ability to provide the node install dir in the pref of the extension in #591
jurildd commentedon Jan 4, 2022
Awesome, will check if it works once it's merged.
Add github-spark extension
Add github-spark extension (#15237)
Add nyxe extension (#31572)
Add app-icons extension (#33140)