我正在尝试从 Windows 迁移到 ubuntu。我有在 Windows 上运行 find 但在 ubuntu 上运行相同项目的 ember 应用程序error Uncaught Error: Could not find module simple-auth-devise/configuration
我遵循的步骤
- git 克隆
- npm 安装 && 凉亭安装
- 余烬发球
在寡妇 app\node_modules\ember-cli-simple-auth-devise\app\initializers
import initializer from 'simple-auth-devise/initializer';
export default initializer;
在 ubuntu 上
import Configuration from 'simple-auth-devise/configuration';
import Authenticator from 'simple-auth-devise/authenticators/devise';
import Authorizer from 'simple-auth-devise/authorizers/devise';
import ENV from '../config/environment';
export default {
name: 'simple-auth-devise',
before: 'simple-auth',
initialize: function(container, application) {
Configuration.load(container, ENV['simple-auth-devise'] || {});
container.register('simple-auth-authorizer:devise', Authorizer);
container.register('simple-auth-authenticator:devise', Authenticator);
}
};
索引.html
<script>
window.EventorENV = {{ENV}};
window.EmberENV = window.EventorENV.EmberENV;
window.ENV = window.ENV || {};
window.ENV['simple-auth'] = {
authorizer: 'simple-auth-authorizer:devise'
}
</script>
<script src="assets/vendor.js"></script>
<script src="assets/eventor.js"></script>
<script>
window.Eventor = require('eventor/app')['default'].create(EventorENV.APP);
</script>