question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

findAll is not a function

See original GitHub issue

I’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:closed
  • Created 7 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
ghostcommented, Feb 25, 2017

Encountering the same issue: although I’ve included store as a dependency for my engine both in app.js and in the engine’s engine.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

4reactions
mydeacommented, Oct 3, 2016

For me, it helped to manually inject the store service in the engine:

export default Route.extend({
  store: inject.service(),
  model() { /* ... */ }
});

After declaring it as a dependency on the engine.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found