ember-cli

No command 'ember' found

让人想犯罪 __ 提交于 2019-12-04 14:56:34
Seems like I messed up with my ember-cli install. I had installed the npm using sudo, but after reading some issues with ember-cli and sudo on npm I went for uninstall and reinstall following the instruction here https://gist.github.com/isaacs/579814 . Now I have installed ember-cli through npm install -g ember-cli but when I do an ember new <name> I get No command 'ember' found, did you mean: Command 'enber' from package 'asn1c' (universe) ember: command not found I can do which node $ which node /home/[user]/local/bin/node and which npm $ which npm /home/[user]/local/bin/npm , but I can see

ember-cli fails on --environment=production (Uncaught Error: Could not find module)

泄露秘密 提交于 2019-12-04 14:00:42
I am using ember-cli and have a problem with selecting the production environment. Specifically, everything works when I run ember serve --environment=development and I get a blank page when I run ember serve --environment=production . In the console, I see: Uncaught TypeError: undefined is not a function Uncaught Error: Could not find module simple-auth/authenticators/base All other things are equal, and all dependencies are up to date. I'm a total noob so I don't even know where to begin on how to debug: is it ember? ember-cli? broccoli? Any help would be appreciated. Daniel Kmak Solution is

How do I customize the view element for the application.hbs template?

自古美人都是妖i 提交于 2019-12-04 13:37:56
In an app generated by ember-cli, the html generated by application.hbs is wrapped in a view: <body class="ember-application"> <div id="ember284" class="ember-view"> </div> </body> If I create a component, I have a component-name.js file where I can specify options to modify the component: export default Ember.Component.extend({ tagName: 'nav', classNames: ['main-menu'], layout: layout }); How do I modify the attributes of the element that is wrapping the application.hbs template? create a file in the app/views directory that follows the naming conventions , application.js import Ember from

Ember/Ember-Cli Serving through Apache throws 404

[亡魂溺海] 提交于 2019-12-04 12:53:20
I'm running into a problem when I try to serve my ember app through Apache. Because the location is set to "history" and not "hash", Apache is trying to load the magic ember routes which don't exist as files. myapp.com/login throws a 404 because there is no login.html. I've done a bit of scouring and its surprising that there isn't much on this which leads me to believe that not many people deploy ember apps on apache. So it's suggested I write Apache URL Rewrite rules, but the one's I have tried don't seem to be working. Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^(.*)

Ember.js: how to analyze error in vendor.js

房东的猫 提交于 2019-12-04 12:35:04
I've deployed my ember-cli app in stage environment to let teammates test the app. In the app I have implemented Ember.onerror to email me errors that occur in stage and in production environment. Ember.onerror = function(data) { Ember.$.ajax({ type: "POST", url: url + "/error", dataType: 'json', contentType: 'application/json', data: JSON.stringify({message: data.message, stacktrace: data.stack}), beforeSend: function (xhr, settings) { xhr.setRequestHeader('Accept', settings.accepts.json); } }); } I'm having difficulties in analyze stacktrace because it references only vendor.js and I can't

Requests proxying stop working after update to ember-cli 0.39

二次信任 提交于 2019-12-04 12:02:46
I have just updated a project from ember-cli 0.37 to 0.39 and api requests are not proxied to the rails backend anymore. I've run ember init and update dependencies but it still doesn't work. ember-cli 0.39 ember 1.6.0-beta.5 ember-data 1.0.0-beta.8 jquery 2.1.0 Thanks. This should be fixed in master now. See https://github.com/stefanpenner/ember-cli/pull/1263 for details. 来源: https://stackoverflow.com/questions/24585860/requests-proxying-stop-working-after-update-to-ember-cli-0-39

“[Report Only] Refused to load the font…” error message on console

China☆狼群 提交于 2019-12-04 10:21:09
问题 More specifically: [Report Only] Refused to load the font 'data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAABBQAAoAAAAAG…H8zVsjnmMx0GcZ2HGViNOySWEa9fvEQtW43Nm+EOO0ZIpdLbMXoVzPJkcfHT6U+gLEpz/MAAAA' because it violates the following Content Security Policy directive: "font-src 'self'". this is my contentSecurityPolicy object at environment.js : contentSecurityPolicy: { 'default-src': "'none'", 'script-src': "'self' 'unsafe-inline' 'unsafe-eval' connect.facebook.net", 'connect-src'

Use Forever with Ember-CLI

感情迁移 提交于 2019-12-04 07:27:16
I've set up a website using Ember-CLI and it is now ready for production, so we're looking for a way to keep it running permanently. Right now we're using $ ember serve --port 80 but obviously this only works whilst we're logged in. I've used Forever before to keep a node app running but am not sure how to make this work with Ember CLI, as the 'ember serve' command obviously does more than just running app.js? Any input would be appreciated! Ember-CLI apps are NOT node apps, they are Browser apps, so you don't need anything special to serve them. To keep and Ember-CLI app running permanently,

Using CDN with ember-cli

我怕爱的太早我们不能终老 提交于 2019-12-04 07:01:17
In my app, developed using ember-cli, I need also some external resources like bootstrap; now I'm importing it through the Brocfile: app.import('bower_components/bootstrap/dist/css/bootstrap.css'); app.import('bower_components/bootstrap/dist/js/bootstrap.js'); Is it possible to use a CDN instead of local file, defining also a callback to local file in case the CDN is offline? Ember-cli-cdn sounds like a partial solution to the problem to me. Here is a quote from the Readme: This addon allows to work with local copies of libraries during development, and then automate switching to your CDN

Fixing Initializers deprecation in Ember 1.12.0

安稳与你 提交于 2019-12-04 06:47:36
I am refering to this particular deprecation that was introduced in Ember 1.12 lookup was called on a Registry. The initializer API no longer receives a container, and you should use an instanceInitializer to look up objects from the container I looked at the guide, but I am unsure on how to fix this. Here's a snippet of the code I have at the moment initialize = (container, app) -> auth = container.lookup('auth-manager:main') local_config = ($.ajax type: 'GET' url: '/config.json' async:false ).responseJSON external_config = ($.ajax type: 'GET' url: local_config.crm.provisioning.url + '/v1