I've had this error on numerous occasions. Here are a few things to look for:
- Check that the table name that is included in the query is spelled correctly, check that is it defined correctly (for sequelize).
- If you are running tests and using Mockery, check that Mockery is setup correctly. Try removing Mockery and running the test.
- Check that if you are trying to stub with Sinon, that Mockery isn't ALSO trying to stub out the same object.
- Example of stubbing with Sinon instead of Mockery: https://gist.github.com/todgru/e439373af2488eefc30ae8bd1fe3864a