Ionic无法登录请求:POST https://api.ionic.io/login该电子邮件未找到用户 [英] Ionic can't login Request: POST https://api.ionic.io/login No user found by that email

查看:1448
本文介绍了Ionic无法登录请求:POST https://api.ionic.io/login该电子邮件未找到用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试运行任何需要登录的Ionic CLI命令时,我收到404错误。

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

这是命令行....

? Password: [hidden]
Request: POST https://api.ionic.io/login
Response: 404
Body: 
{ link: null,
  message: 'No user found by that email',
  type: 'NotFound' }

I我肯定会输入正确的帐户详细信息,以确保我甚至在 https://dashboard.ionicjs.com创建了几个新帐户/注册,确保我验证了电子邮件地址但仍然是同样的错误。

I am definitely entering the correct account details, to ensure this I even created several new accounts at https://dashboard.ionicjs.com/signup, ensured I had validated the email address but still the same error.

(我刚刚在这个问题上丢失了8个小时,所以我在这里发布Q& A来帮助其他人。)

推荐答案

此错误是由于Ionic正在转换为Ionic Pro并且CLI需要使用正确的API。它试图将登录请求发布到 api.ionic.io/login 的事实表明它正在尝试使用旧的遗留系统。您可以通过在配置中设置后端值来配置它使用的系统。

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.

要修复:

首先,确保您的Ionic CLI是最新的。

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

检查版本:

ionic cli -v

撰写本文时应为3.9.2。如果没有更新它:

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

npm install -g ionic@latest 

现在您已经获得了最新的CLI,告诉它使用pro而不是遗产:

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

ionic config set backend pro -g

注意:当我在我的机器上执行此操作时,它首先无法正常工作,但我仍然遇到No user found错误。我实际上必须首先将后端切换为legacy(使用相同的命令),然后再返回pro。我不知道为什么要修复它,但确实如此。

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.

这篇关于Ionic无法登录请求:POST https://api.ionic.io/login该电子邮件未找到用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆