title: TypeError: sequelize.import is not a function
body: <p>I am running into an error and I cannot find a solution to it:</p>
  <pre><code>C:\Users\student\Desktop\project\src\models\index.js:17
    User: sequelize[&quot;import&quot;]('./user'),
                             ^
  
  TypeError: sequelize.import is not a function
      at Object.&lt;anonymous&gt; (C:\Users\student\Desktop\project\src\models\/index.js:13:9)
      at Module._compile (internal/modules/cjs/loader.js:1137:30)
      at Module._compile (C:\Users\student\Desktop\project\node_modules\pirates\lib\index.js:99:24)
      at Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
      at Object.newLoader [as .js] (C:\Users\student\Desktop\project\node_modules\pirates\lib\index.js:104:7)
      at Module.load (internal/modules/cjs/loader.js:985:32)
      at Function.Module._load (internal/modules/cjs/loader.js:878:14)
      at Module.require (internal/modules/cjs/loader.js:1025:19)
      at require (internal/modules/cjs/helpers.js:72:18)
      at Object.&lt;anonymous&gt; (C:\Users\student\Desktop\project\src\/index.js:9:1)
  [nodemon] app crashed - waiting for file changes before starting...
  </code></pre>
  <p>Here is the code:</p>
  <pre><code>import Sequelize from 'sequelize';
  
  const sequelize = new Sequelize(
    process.env.DATABASE,
    process.env.DATABASE_USER,
    process.env.DATABASE_PASSWORD,
    {
      dialect: 'postgres',
    },
  );
  
  const models = {
    User: sequelize.import('./user'),
    Message: sequelize.import('./message'),
  };
  
  Object.keys(models).forEach(key =&gt; {
    if ('associate' in models[key]) {
      models[key].associate(models);
    }
  });
  
  export { sequelize };
  
  export default models;
  </code></pre>
  <pre><code>&quot;devDependencies&quot;: {
      &quot;@babel/core&quot;: &quot;^7.12.9&quot;,
      &quot;@babel/node&quot;: &quot;^7.12.6&quot;,
      &quot;@babel/preset-env&quot;: &quot;^7.12.7&quot;,
      &quot;nodemon&quot;: &quot;^2.0.6&quot;
    },
    &quot;dependencies&quot;: {
      &quot;apollo-server&quot;: &quot;^2.19.0&quot;,
      &quot;apollo-server-express&quot;: &quot;^2.19.0&quot;,
      &quot;cors&quot;: &quot;^2.8.5&quot;,
      &quot;dotenv&quot;: &quot;^8.2.0&quot;,
      &quot;express&quot;: &quot;^4.17.1&quot;,
      &quot;graphql&quot;: &quot;^15.4.0&quot;,
      &quot;pg&quot;: &quot;^8.5.1&quot;,
      &quot;sequelize&quot;: &quot;^6.3.5&quot;,
      &quot;uuid&quot;: &quot;^8.3.1&quot;
  </code></pre>
  <p>I am not sure the right direction to look to solve the issue. Any help is appreciated if you've run into something similar. I've added the dev dependencies in case that helps.</p>