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

CLI Fails with no message

ANSWERED

This might be more of a npx question than a Fitbit one.  I am no longer able to run the fitibit module from one of my development PCs.  When I issue the command: npx fitbit, it fails without any message:

C:\>npx fitbit
npx: installed 1 in 2.405s
Path must be a string. Received undefined
npx: installed 3 in 4.263s
Path must be a string. Received undefined

C:\>

That's the only output.  Can anyone tell me how to debug this?  I don't see a way to force npx to log it's output.  There is some output that is erased as the routine continues but it doesn't look like errors.

Thanks for any help.

Rich

EDIT:

I'm going to answer my own question.  I didn't realize I was not in the project folder when I brought up the command prompt.  So simple.  And so obvious but frustrating because there was no message to let me know.  So if you're running into this make sure you're in the project folder.

 

I'm now getting an authorization error but I'll ask about that in another post.

 EDIT2:

I got the silent failure again on a different project.  Totally user error but I wish it wouldn't fail silently.  This time, I was configuring an existing project to be used with the CLI.  One of the only steps is to add the dependencies section to the package.json file. Seems simple enough but I added it under the "fitbit" section, after all it is a fitbit dependency or so I thought.  I guess it's really an npm dependency.  In any case, the next step is to run the npm install.  Which works fine except it doesn't find the dependencies in the .json file.  So no fitbit/sdk or fitbit/sdk-cli.  Moving the dependency out of the fitbit section and rerunning the install fixes the problem.  For those of you new to this (as I am), your package.json file should look something like this:

 

{
  "name": "testcli",
  "version": "0.1.0",
  "private": true,
  "license": "UNLICENSED",
  "devDependencies": {
    "@fitbit/sdk": "~1.0.2",
    "@fitbit/sdk-cli": "^1.0.1"
  },
  "fitbit": {
...

 

 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Glad you got there in the end! I'll try to clarify some of these points in the guide.

View best answer in original post

Best Answer
0 Votes
1 REPLY 1

Glad you got there in the end! I'll try to clarify some of these points in the guide.

Best Answer
0 Votes