I'm migrating my project from a situation where it was a nested asset in a Rails app to separate frontend with Ember-Cli. And I've been stuck with the following problem for quite some time now:
When running $ Ember serve
in my terminal and opening localhost:4200
with Chrome I get the following error in the console: Uncaught TypeError: undefined is not a function
in app-boot.js:25
On that line the following code is present:
require("my_app/app")["default"].create({
"defaultLocale":"en",
"name":"my_app",
"version":"0.0.0.bece32c1"
});
I added a breakpoint on that line and checked if require("my_app/app"
was defined, and it was Object {default: Class}
so I checked if the default object property was defined, and this also was the case:
Class {modulePrefix: "my_app", podModulePrefix: undefined,
Resolver: function, _readinessDeferrals: 1, $: function…}
The console output of require("my_app/app")["default"]
can be seen in the following screenshot:
This is the content of my config/environment
file:
And this is the content of my app/index.html
file:
And this is the content of my app/app.js
file:
I'm using the latest version of Ember-cli, Ember v1.10.0, ember-data v1.0.0-beta.15 and Jquery 1.11.2
I hope someone knows a solution for this problem or can point me in the right direction. If you need more information don't hesitate to ask!
Thanks in advance,
Alexander Jeurissen
Aucun commentaire:
Enregistrer un commentaire