Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

fitbit CLI: "npx fitbit" does not open login window

ANSWERED

To build and install my project using CLI, I need to run the command "npx fitbit" after successfully running "npx fitbit-build". But if I run the command "npx fitbit" in either the CLI or Visual Studio it says "No login information, starting login...".

At this point, a windows should open where I can enter my login credentials to continue, but it doesn't. It also does not give any errors.

I can't find anything online about this issue, so can someone help me with this?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

I tried reverting back to node 16, but that also does not change anything.

 

I tried doing it on an ubuntu VM and that seems to work. This is not really an answer to my question of this form, but this will do for me for now.

I guess this is just a very specific bug for my case.

Thx everyone for your time and help!

View best answer in original post

Best Answer
0 Votes
13 REPLIES 13

It should open a web browser window or tab. If your browser is open, check it.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

Thx Peter for your answer, but unfortunately the login window also does not appear in a browser tab that is already open. I also tried closing all browsers and running the command again but that also had no effect. Running Visual Studio as administrator does not do anything either.

Best Answer
0 Votes

if you've got the correct fitbit dependencies in your package.JSON you could try removing the node_modules folder and reinstall npm i

 

Best Answer
0 Votes

Hello Barbara, thx for your answer.

 

In my package.JSON file are the newest fitbit dependencies (fitbit sdk 6.1.0 and fitbit sdk-cli 1.7.3).

Still after removing the node_modules folder and reinstalling npm, it shows the same behaviour.

 

I also followed the tutorial on https://dev.fitbit.com/build/guides/command-line-interface/ again from the start with all preriquisites, but it is still the same.

 

Is there maybe another way to provide the login information, so the command "npx fitbit" does not have to open a window?

Best Answer
0 Votes
So you ran npm add @Fitbit/sdk -d
and npm add @Fitbit/sdk-cli -d before?

I actually can't remember the first setup. Now when I type npx fitbit it
directly connects.
But pretty sure there was a console promt while installing fitbit to rnter
my credentials
Best Answer
0 Votes

I did not run those commands because when I create a new project from the command line, they are already in the package.JSON file automatically.

 

 

Best Answer
0 Votes

oh... yeah, but I think you'd need to install them (??) at least I do. But might be differently as I set up differently for typescript.
I really think you should try that. wouldn't do any harm if it was not that

 

 

Best Answer
0 Votes

When I run the commands, it says that they are up to date. Unfortunately it does not make any difference.

Best Answer
0 Votes
Ok. Was worth a try.. and if you try another browser?
Best Answer
0 Votes

...and sorry for only providing guesses. It's so long since I installed it. But I remember it took me ages to get it running.

Best Answer
0 Votes

The problem is that it does not launch a browser at all. I can try changing my standard browser to see if that makes a difference.

 

Best Answer
0 Votes

There's a TINY chance that it's related to node version. I've never had much success with node 18; I'm using 16.

I also have frequent battles with keytar, which requires native code despite living in node_modules. However, if you were having keytar build problems, that should show up during npm i.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

I tried reverting back to node 16, but that also does not change anything.

 

I tried doing it on an ubuntu VM and that seems to work. This is not really an answer to my question of this form, but this will do for me for now.

I guess this is just a very specific bug for my case.

Thx everyone for your time and help!

Best Answer
0 Votes