customerio / cio-sdk-tools

A self service tool to run diagnostics on your mobile SDK installation
MIT License
2 stars 0 forks source link

error: unknown command 'doctor@latest' #26

Closed byronmil closed 7 months ago

byronmil commented 7 months ago

When running the SDK Doctor in the directory I am attempting to test, an error is returned:

npx cio-sdk-tools doctor@latest
Need to install the following packages: cio-sdk-tools@1.2.0 Ok to proceed? (y) y error: unknown command 'doctor@latest'

Note, I first had to resolve an npm bug, possibly related?

npm ERR! Your cache folder contains root-owned files, due to a bug in npm ERR! previous versions of npm which has since been addressed. npm ERR! npm ERR! To permanently fix this problem, please run: npm ERR! sudo chown -R 501:20 "/Users/userName/.npm"

Originally reported by US Mobile Inc (Premium account #74086): https://customer7760.zendesk.com/agent/tickets/78852

levibostian commented 7 months ago

The @latest part is in the incorrect place.

// correct
npx cio-sdk-tools@latest doctor

// incorrect
npx cio-sdk-tools doctor@latest

I do see that there is 1 place in our README where we use doctor@latest. Perhaps that's what caused this confusion?

I'll push a fix to the README right now.

byronmil commented 7 months ago

I'll submit an update for our troubleshooting doc https://customer.io/docs/journeys/troubleshooting-mobile/#2-run-cio-sdk-tools

Thanks @levibostian !

levibostian commented 7 months ago

Great catch! Yes, that needs updated.