command-line-interfaceaws-clialexa-skills-kitask-cli

After successful(?) installation of ask-cli, I'm getting a deployment error where it says invalid json. How do I fix this?


yashadnani$ npm install -g ask-cli

/usr/local/bin/ask -> /usr/local/lib/node_modules/ask-cli/bin/ask.js

updated 1 package in 1.695s

Yashs-MacBook-Pro:~ yashadnani$ ask init

Invalid json: /Users/yashadnani/.ask/cli_config

Yashs-MacBook-Pro:~ yashadnani$ sudo npm install -g ask-cli

/usr/local/bin/ask -> /usr/local/lib/node_modules/ask-cli/bin/ask.js

updated 1 package in 1.679s

Yashs-MacBook-Pro:~ yashadnani$ ask init

Invalid json: /Users/yashadnani/.ask/cli_config


Solution

  • You can resolve this issue by deleting the .ask/ folder :

    rm -rf .ask/
    

    And then reinstalling the cli from scratch using

    npm install ask-cli -g
    

    And then you can run ask init to complete the setup.