I'm trying to use ember-simple-auth with ember-cli-simple-auth-token:
我正在尝试使用ember-simple-auth和ember-cli-simple-auth-token:
"ember-cli-simple-auth-token": "^0.7.3",
"ember-simple-auth": "1.0.1"
And that's my configurations:
那是我的配置:
ENV['simple-auth-token'] = {
authorizer: 'simple-auth-authorizer:token',
identificationField: 'email',
serverTokenEndpoint: 'http://localhost:3000/token'
};
Am i missing something? Cause i'm receiving this error in my console:
我错过了什么吗?因为我在我的控制台中收到此错误:
Could not find module
simple-auth/authenticators/base
imported fromsimple-auth-token/authenticators/token
找不到从simple-auth-token / authenticators / token导入的模块simple-auth / authenticators / base
I already try to uninstall and npm prune, and reinstall.. and the same message keeps showing.
我已经尝试卸载和npm修剪,并重新安装..并显示相同的消息。
Thanks guys.
2 个解决方案
#1
0
No - simple-auth-token hasn't been updated as yet. A couple of minor changes seems to get it going again, which I will post to the author.
否 - simple-auth-token尚未更新。一些微小的变化似乎再次发生,我将发布给作者。
The changes in the ember-simple-auth-token module required are:
所需的ember-simple-auth-token模块的更改包括:
1) app/initializers/simple-auth.js:
- change "simple-auth" on line 1 to "ember-simple-auth" and
- remove (or comment out) lines 2 and 9 (the import for setup, and the call
将第1行的“simple-auth”更改为“ember-simple-auth”和
删除(或注释掉)第2行和第9行(设置导入和调用
to setup).
2) addon/authenticators/token.js: change "simple-auth" on line 2 to "ember-simple-auth"
2)addon / authenticators / token.js:将第2行的“simple-auth”改为“ember-simple-auth”
3) addon/authorizers/token.js: change :simple-auth" on line 2 to "ember-simple-auth"
3)addon / authorizers / token.js:change:simple-auth“on line 2 to”ember-simple-auth“
Hopefully that helps a few people out there struggling with this.
希望这有助于一些人在这里挣扎。
Cheers!
#2
0
The name of the addon is ember-simple-auth
and it's looking for a path simple-auth/authenticators/base
which should be ember-simple-auth/authenticators/base
. You should correct that import in the file simple-auth-token/authenticators/token
.
插件的名称是ember-simple-auth,它正在寻找一个简单的auth / authenticators / base路径,它应该是ember-simple-auth / authenticators / base。您应该在文件simple-auth-token / authenticators / token中更正该导入。
#1
0
No - simple-auth-token hasn't been updated as yet. A couple of minor changes seems to get it going again, which I will post to the author.
否 - simple-auth-token尚未更新。一些微小的变化似乎再次发生,我将发布给作者。
The changes in the ember-simple-auth-token module required are:
所需的ember-simple-auth-token模块的更改包括:
1) app/initializers/simple-auth.js:
- change "simple-auth" on line 1 to "ember-simple-auth" and
- remove (or comment out) lines 2 and 9 (the import for setup, and the call
将第1行的“simple-auth”更改为“ember-simple-auth”和
删除(或注释掉)第2行和第9行(设置导入和调用
to setup).
2) addon/authenticators/token.js: change "simple-auth" on line 2 to "ember-simple-auth"
2)addon / authenticators / token.js:将第2行的“simple-auth”改为“ember-simple-auth”
3) addon/authorizers/token.js: change :simple-auth" on line 2 to "ember-simple-auth"
3)addon / authorizers / token.js:change:simple-auth“on line 2 to”ember-simple-auth“
Hopefully that helps a few people out there struggling with this.
希望这有助于一些人在这里挣扎。
Cheers!
#2
0
The name of the addon is ember-simple-auth
and it's looking for a path simple-auth/authenticators/base
which should be ember-simple-auth/authenticators/base
. You should correct that import in the file simple-auth-token/authenticators/token
.
插件的名称是ember-simple-auth,它正在寻找一个简单的auth / authenticators / base路径,它应该是ember-simple-auth / authenticators / base。您应该在文件simple-auth-token / authenticators / token中更正该导入。