0

我使用命令创建了一个 API Connect 项目

apic loopback

当我尝试启动 API 设计器时,我收到如下错误:

sdil@sdil-VirtualBox:~/Project/test-apic/todo4$ apic edit

The user model "User" is attached to an application that does not specify
whether other sessions should be invalidated when a password or
an email has changed. Session invalidation is important for security
reasons as it allows users to recover from various account breach
situations.

We recommend turning this feature on by setting
"logoutSessionsOnSensitiveChanges" to true in
server/config.json (unless you have implemented your own solution
for token invalidation).

We also recommend enabling "injectOptionsFromRemoteContext" in
User's settings (typically via common/models/*.json file).
This setting is required for the invalidation algorithm to keep
the current session valid.

Learn more in our documentation at
https://loopback.io/doc/en/lb2/AccessToken-invalidation.html

Error: loopback.errorHandler is no longer available. Please use the module "strong-error-handler" instead.

当我检查 package.json 中的声明时,我确实看到了 strong-error-handler 的编写。

"dependencies": {
    ...
    "strong-error-handler": "^2.0.0",
}

如何解决此问题以使 API Designer 运行?

4

1 回答 1

1

实际上,我有点认识到这个问题。我们有新的强错误处理程序,但也有旧的。

在此处执行“从旧 LoopBack 错误处理程序迁移”中的步骤:

https://loopback.io/doc/en/lb3/Using-strong-error-handler.html#migration-from-old-loopback-error-handler

应该彻底淘汰旧的。

于 2017-05-16T06:07:11.300 回答