Registry / database / sequelize-cli-esm

sequelize-cli-esm

JSON →
library5.0.6jsnpmunverified

A command-line interface for Sequelize ORM with support for EcmaScript Modules (ESM). Version 5.0.6 provides commands for database migrations, seeding, model generation, and schema management. Built as a drop-in replacement for sequelize-cli with ESM compatibility. Maintained as a community fork. Active development but pace is moderate; primarily targets Node.js projects using ESM modules with Sequelize.

npm install sequelize-cli-esm
INSTALL
IMPORT
SIG · SEQUELIZE-CLI-ESM
S
sequelize-cli-esm
databasejavascriptv5.0.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Shows global and local installation, project initialization, model generation, migration, and seeding commands.

npm install -g sequelize-cli-esm # or locally: npm install --save-dev sequelize-cli-esm sequelize # Initialize project npx sequelize-cli-esm init # Generate a model npx sequelize-cli-esm model:generate --name User --attributes firstName:string,lastName:string,email:string # Run migrations npx sequelize-cli-esm db:migrate # Seed database npx sequelize-cli-esm db:seed:all
Debug
Known issues
deprecatedsequelize-cli-esm is a community fork of the original sequelize-cli which was deprecated in favor of @sequelize/cli.
fix
Consider migrating to official @sequelize/cli package for long-term support and recent Sequelize compatibility.
affects: >=0.0.0
gotchaESM support is experimental and may have edge cases with dynamic imports or module resolution.
fix
Use CommonJS (.cjs) config files if issues arise with .js files; ensure package.json has 'type: module' when using ESM.
affects: >=5.0.0
gotchaThe CLI expects a Sequelize instance or config; if using ESM, the config file must export a module or object.
fix
Use export default or module.exports in config file based on project type.
affects: >=5.0.0
breakingCLI commands fail silently if sequelize is not installed as a dependency.
fix
Ensure sequelize is listed in dependencies or devDependencies.
affects: >=3.0.0
Errors
Common errors & fixes
Error: Cannot find module 'sequelize'
sequelize not installed or not in node_modules
fix
Run npm install sequelize or yarn add sequelize
SyntaxError: Unexpected token 'export'
Config/migration file uses ESM export syntax but Node.js is not in ESM mode
fix
Add 'type': 'module' to package.json or rename file to .mjs
sequelize-cli-esm: command not found
Package not installed globally or locally
fix
Install globally: npm install -g sequelize-cli-esm; or use npx sequelize-cli-esm
Error: Dialect needs to be explicitly supplied as of v4.0.0
Config file missing dialect property
fix
Add 'dialect': 'postgres' (or mysql/sqlite/mssql) to config
Upgrade
Version history
5.0.6latest on npm
Audit
Dependencies
sequelizerequiredRuntime ORM required for migration/seed execution
Agent activity
13 hits · last 30 days
node
10
Resources
sequelize-cli-esm — npm install sequelize-cli-esm · libregistry