我刚刚尝试安装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
。
我尝试根据"旧指令"手动运行这些命令。找到here
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
并且app拒绝加载。
我能够让应用再次运作的唯一方法是删除:
"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
答案 0 :(得分:0)
您看到的错误(" ember generate命令需要指定实体名称。有关详细信息,请使用ember帮助。 " )实际上是不相关的,因为它不会阻止实际重要的任务运行will be fixed in the next version of Ember CLI probably。
现在你可以放心地忽略它。