Comments (2)
Alright, this is a result of sequelize-cli
not requiring a specific version of js2coffee
per its package.json
, and instead simply expecting any version of js2coffee
installed locally on the machine.
Background
js2coffee
just released version 2.0.0 eight hours ago, per the time of this writing. Link here: js2coffee/js2coffee@9f8c1bb
In doing so, they changed the output of the build()
function to return an object: https://github.com/js2coffee/js2coffee/blob/master/notes/Migration_guide.md#javascript-api-js2cofeebuild
Possible solutions
- Change
/lib/helpers/template-helper.js
, line 30, tocontent = this.getCoffeeConverter().build(content).code;
, implicitly expectingjs2coffee
version 2.0.0. This, of course, breaks backwards compatibility with older versions ofjs2coffee
- Write some code in
template-helpers.js
that evaluates the output type (string vs. object) and returns the correct result accordingly. - Require a specific version of
js2coffee
as a dependency withinpackage.json
so we don't ever get caught off guard.
I recommend solution 3 as the last thing we want is for migrations to fail on production machines.
I'm willing to submit a PR, but don't want to commit time to it until I know which solution you'd prefer to have.
Aside: I can just as easily solve the issue by requiring js2coffee < 2.0.0
in my app's package.json
, and will do that for the time being, but I think sequelize should be explicit about what versions of dependencies it requires.
from cli.
Thanks for the report. This issue is fixed in the just released 1.0.8
from cli.
Related Issues (20)
- BulkInsert "relation does not exist" in migration script
- const model = require(path.join(__dirname, file)).default( ^ TypeError: require(...).default is not a function
- const model = require(path.join(__dirname, file)).default( ^ TypeError: require(...).default is not a function HOT 1
- Sequelize CLI Fails to Authenticate with Postgres DB Containing a ':' in Password HOT 4
- CLI is not taking default env like node latest versions have (20.8.0)
- SequelizeMeta structure incompatible with SingleStore/memsql HOT 2
- Problem running migrations with yarn
- When on typescript project, sequelize-cli still generates javascript files. HOT 3
- Running migrations, on Azure database HOT 1
- Seeders state in database with using url option
- Migration undo command didn't work correctly. HOT 1
- where condition in literal HOT 1
- nested dependency es5-ext has a security vulnerability (low) and needs update HOT 1
- Subsequent migrations fail after running db:migrate:schema:timestamps:add command
- Please install sqlite3 package manually
- Incompatibility Error with [email protected] and Node.js 21.7.3 HOT 2
- Error: Dialect needs to be explicitly supplied as of v4.0.0 HOT 2
- npx sequelize-cli db:migrate command don't read the environment variables with PM2 HOT 2
- ERROR: Error reading "config\config.js". Error: undefined. Migracion con sequelize-cli HOT 6
- Dialect options being ignored for mssql named instance
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.