环回警告:范围 User.accessTokens 目标 class "AccessToken",未通过远程处理公开

loopback Warning: scope User.accessTokens targets class "AccessToken", which is not exposed via remoting

所以,标题是一个问题。尝试从环回应用程序生成 angular 服务,但出现此错误

Loading LoopBack app "xxx\server\server.js" Generating "lbServices" for the API endpoint "/api" Warning: scope User.accessTokens targets class "AccessToken", which is not exposed via remoting. The Angular code for this scope won't be generated. Warning: scope AppUser.accessTokens targets class "AccessToken", which is not exposed via remoting. The Angular code for this scope won't be generated. undefined:25 throw err; ^

不确定它何时停止工作:更新 slc 之后或我的一些编码之后

有什么想法吗?

好吧,删除 node_modulesnpm cache clean 并重新安装,使它栩栩如生。

将模型中的 AccessToken public 属性 更改为 true-config.json

"AccessToken": {
"dataSource": "mongo",
"public": true }