Ionic can't login Request: POST https://api.ionic.io/login No user found by that email

前端 未结 2 1561
攒了一身酷
攒了一身酷 2020-12-30 02:00

When I try to run any Ionic CLI commands that require login I get a 404 error.

Here\'s the command line....

? Password: [hidden]
Request: POST https         


        
相关标签:
2条回答
  • 2020-12-30 02:07

    This error is due to the fact that Ionic are transitioning to "Ionic Pro" and the CLI needs to use the correct API. The fact that it is attempting to post login requests to api.ionic.io/login shows it's trying to use the old legacy system. You configure which system it uses by setting the backend value in the config.

    To Fix:

    Firstly, make sure your Ionic CLI is bang up-to-date.

    Check the version:

    ionic cli -v
    

    It should be 3.9.2 at time of writing. If not update it:

    npm install -g ionic@latest 
    

    Now you've got the latest CLI you need to tell it to use "pro" not legacy:

    ionic config set backend pro -g
    

    NOTE: When I did this on my machine it did not work at first and I still got the same "No user found" error. I actually had to switch the backend to "legacy" first (using that same command) and then back to "pro". I have no idea why this fixed it but it did.

    0 讨论(0)
  • 2020-12-30 02:23

    Assuming you have already installed git in windows...

    1) Control Panel > System > Edit the system variables

    2) System Properties > Advanced (Tab) > Environment Variables (Bottom of tab)

    3) System Variables > New

    Variable Name: ssh-keygen

    Variable Value C:\Program Files\Git\git-cmd

    Click ok

    4) Close and restart you CMD/Shell Window

    4) in the CMD window type ionic login

    0 讨论(0)
提交回复
热议问题