ASK CLI INIT not working

旧巷老猫 提交于 2019-12-11 14:12:49

问题


I am new to ask cli but I have created skills directly on alexa online console and using lamda.

I installed ask cli using npm install from my Node.js command prompt. I then tried to initialize it using ask init.

ask cli asks me to select a default profile and then opens up Amazon login page. I then sign in but after that it opens up 127.0.... page on my IE which gives "cannot reach this page" error. Also in the cmd prompt it shows as listening to localhost:9090 but it stucks there and nothing happens.

So I closed the Node.js command propmt and opened a fresh one. Here I tried the ask clone command but it gives me error "The property "token" does not exist.".

Please help me as I really need to get this done today itself


回答1:


ask init ships with the --no-browser option which you can use as yet another approach.

  • Run ask init --no-browser.
  • Copy the generated link from the terminal an open it in your browser.
  • It will ask you to login to your Amazon Developer console (don't mix it with AWS Console it's important).
  • Once you logged in, copy the generated Auth Code and paste it back to terminal.

That should be suffice to configure ask init.


In additional you may want to configure AWS credentials. More info about here.




回答2:


I had the same issue. Turns out it was Nodejs was version 10. I uninstalled it and installed version 8.12 and then everything worked properly.




回答3:


I would suggest downgrading to v8.12 as suggested by Amazon developer himself here: https://forums.developer.amazon.com/answers/190399/view.html

This helped in capturing correct token and the CLI is now responding perfectly. LTS v10 and current v11 are definitely not working with the current version of ask-CLI v1.4.9



来源:https://stackoverflow.com/questions/48690820/ask-cli-init-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!