findAll is not a function
See original GitHub issueI’m trying to do a basic store
request on the application
route of my Ember Engine add-on, but parent app is tripping up on the below.
Error while processing route: products.index this.get(...).findAll is not a function TypeError: this.get(...).findAll is not a function
import Ember from 'ember';
const { Route } = Ember;
export default Route.extend({
model() {
return this.get('store').findAll('product');
}
});
What is strange is that I can see the GET
request return the expected data in the network tab.
- ember-cli 2.8.0
- ember 2.8.0
- ember-engines 0.3.0
The engine is a separate add-on I set up following the repo guides and functions as expected if I remove the findAll
. The store
dependency is defined in the engine and parent app.
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Sequelize findAll is not a function - Stack Overflow
Sequelize findAll is not a function ; In your passport.js try to do it like var models = require('../models'); var User = models.nuke_users;....
Read more >findAll is not a function. (Example) | Treehouse Community
findAll is not a function. Hello,. I tried to implement this in an application I'm building myself but seemed to have run into...
Read more >Help! findAll is not a function error : r/node - Reddit
findAll is not a function error. Hello reddit. I'm new at node and I decided to make ... findAll() .then(users => { console.log(users);...
Read more >sequelize user.findall is not a function
Sequelize is returning an array of instance objects in users. An instance object has a number of convenience methods attached to it that...
Read more >TypeError: User.findAll is not a function-sequelize.js
[Solved]-SequelizeJS Error: TypeError: User.findAll is not a function-sequelize.js ... You should require models/index.js where you're going to use models, not ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Encountering the same issue: although I’ve included
store
as a dependency for my engine both inapp.js
and in the engine’sengine.js
, I still have to manually inject the store into engine routes, or else it cannot find models in the application store.ember v2.8.3 ember-engines v0.3.4
For me, it helped to manually inject the store service in the engine:
After declaring it as a dependency on the engine.