Sequelize has very opaque errors

While trying out sequelize, I was TDD’ing some code using mocha and reached this error from mocha while watching a test fail:

Error: global leak detected: columnTypes

So I looked through the code and found https://github.com/sequelize/sequelize/blob/f16f39221d9f3be64d7fd58235d5420eba4e10be/lib/dialects/sqlite/query.js#L38 which certainly looks like it would be a global leak, since the code is referring to “this” inside of an anonymous function.

However, inside the sequelize tests, “this” was referring to some sort of representation of the query, likely due to an “apply” or “call” somewhere.  Some time later, I just tried to get the test to pass, and once I sync()ed the table and added some columns to the model, it did.

Long story short: that is the error that you get when:

  1. the table does not exist
  2. the model does not have any attributes
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s