loopback警告:范围User.accessTokens目标类“AccessToken”,它不通过远程处理公开

时间:2016-08-11 12:38:32

标签: javascript loopbackjs strongloop loopback

所以,标题是一个问题。尝试从loopback应用程序生成角度服务,但得到此错误

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后或我的一些编码之后

有什么想法?

2 个答案:

答案 0 :(得分:1)

在model-config.json中将AccessToken公共属性更改为true

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

答案 1 :(得分:0)

好吧,删除node_modulesnpm cache clean并重新安装,可以实现这一目标。