我一直在尝试安装ember-cli-simple-auth
和ember-cli-simple-auth-devise
.
上周我经历了完全相同的过程,效果很好。但是,从那时起,Ember CLI 已经更新,并且 install:addon 命令已被弃用。
所以而不是:
ember install:addon ember-cli-simple-auth
ember install:addon ember-cli-simple-auth-devise
我在用:
ember install ember-cli-simple-auth
ember install ember-cli-simple-auth-devise
但是,在每个命令结束时,我得到:
该
ember generate
命令需要指定实体名称。有关更多详细信息,请使用ember help
.
我尝试根据此处找到的“旧指令”手动运行这些命令
ember generate ember-cli-simple-auth
ember generate ember-cli-simple-auth-devise
但是当我启动服务器时,我收到以下错误:
loader.js:110 未捕获的错误:找不到
simple-auth-devise/configuration
从导入的模块bazmics/initializers/simple-auth-devise
并且应用程序拒绝加载。
我能够让应用程序再次运行的唯一方法是删除:
"ember-cli-simple-auth": "^0.8.0-beta.1",
"ember-cli-simple-auth-devise": "^0.8.0-beta.1",
从我的 packages.json 运行npm install
,然后重新启动我的服务器。
为了更好地衡量,我尝试使用npm install...
而不是ember install...
然后运行安装程序。没有错误,但最终结果相同。
我的版本:
DEBUG: -------------------------------
ember.debug.js:5197DEBUG: Ember : 1.11.1
ember.debug.js:5197DEBUG: jQuery : 1.11.2
ember.debug.js:5197DEBUG: -------------------------------
VM11004:66 Ember Inspector Active
更新:2015 年 8 月 4 日
我刚刚尝试运行以下命令:
npm install --save-dev ember-cli-simple-auth
npm install --save-dev ember-cli-simple-auth-devise
generate ember-cli-simple-auth
generate ember-cli-simple-auth-devise
我没有收到任何错误,但是当我运行时发生了同样的事情ember server
(页面正文没有渲染)。
在上面的命令之后,我的 package.json 的内容是:
{
"name": "enerlytics",
"version": "0.0.0",
"description": "Small description for enerlytics goes here",
"private": true,
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"start": "ember server",
"build": "ember build",
"test": "ember test"
},
"repository": "",
"engines": {
"node": ">= 0.10.0"
},
"author": "",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.0.2",
"broccoli-sass": "^0.6.4",
"ember-cli": "0.2.3",
"ember-cli-app-version": "0.3.3",
"ember-cli-babel": "^5.0.0",
"ember-cli-bootstrap-sass": "^0.2.11",
"ember-cli-content-security-policy": "0.4.0",
"ember-cli-dependency-checker": "0.0.8",
"ember-cli-htmlbars": "0.7.4",
"ember-cli-ic-ajax": "0.1.1",
"ember-cli-inject-live-reload": "^1.3.0",
"ember-cli-qunit": "0.3.10",
"ember-cli-simple-auth": "^0.8.0-beta.1",
"ember-cli-simple-auth-devise": "^0.8.0-beta.1",
"ember-cli-uglify": "1.0.1",
"ember-data": "1.0.0-beta.16.1",
"ember-export-application-global": "^1.0.2"
}
}
我的 node_modules 文件夹的内容是:
broccoli-asset-rev
broccoli-sass
ember-cli
ember-cli-app-version
ember-cli-babel
ember-cli-bootstrap-sass
ember-cli-content-security-policy
ember-cli-dependency-checker
ember-cli-htmlbars
ember-cli-ic-ajax
ember-cli-inject-live-reload
ember-cli-qunit
ember-cli-simple-auth
ember-cli-simple-auth-devise
ember-cli-uglify
ember-data
ember-export-application-global
我的 bower.json 的内容是:
{
"name": "enerlytics",
"dependencies": {
"ember": "1.11.1",
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
"ember-data": "1.0.0-beta.16.1",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.4",
"ember-qunit": "0.3.1",
"ember-qunit-notifications": "0.0.7",
"ember-resolver": "~0.1.15",
"jquery": "^1.11.1",
"loader.js": "ember-cli/loader.js#3.2.0",
"qunit": "~1.17.1",
"bootstrap-sass-official": "~3.3.4",
"ember-simple-auth": "0.8.0-beta.1"
}
}
我的 bower_components 文件夹的内容是:
bootstrap-sass-official
ember
ember-cli-shims
ember-cli-test-loader
ember-data
ember-load-initializers
ember-qunit
ember-qunit-notifications
ember-resolver
ember-simple-auth
jquery
loader.js
qunit
qunit-notifications