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
This is for future developers who come here for this message.
Kindly check if you have passed right variable name containing Tablename for query or you might have missed it in function arguments or somewhere you left the table name reference from modal.<SAMPLE_TABLE_NAME>