Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error executing model generate #3

Open
lrlineroa opened this issue Nov 11, 2020 · 3 comments
Open

Error executing model generate #3

lrlineroa opened this issue Nov 11, 2020 · 3 comments

Comments

@lrlineroa
Copy link

$ node generator_model.js
======== on query ==========
select KEY_COLUMN_USAGE.* from KEY_COLUMN_USAGE where REFERENCED_COLUMN_NAME is not null and table_schema = "cuploo"
======== on query ==========
select TABLES.* from TABLES where table_schema = "cuploo"
======== on query ==========
select COLUMNS.* from COLUMNS where COLUMNS.TABLE_NAME in ("knex_migrations", "knex_migrations_lock", "users") and TABLE_SCHEMA = "cuploo"
node:internal/process/promises:218
triggerUncaughtException(err, true /* fromPromise */);
^

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function. Received undefined
at new NodeError (node:internal/errors:258:15)
at maybeCallback (node:fs:160:9)
at Object.writeFile (node:fs:1435:14)
at main (C:\projects\CG\next_projects\cuploo_back\database\generator_model.js:13:12) {
code: 'ERR_INVALID_CALLBACK'
}

Hi, when I try generate the models from the database, i get this error, any help, thanks

@lrlineroa
Copy link
Author

I just did a fork of the project and then clone, in development work perfectly, I just changed a few things, but in production, i'm still getting the error above. I suggest see what happen

@sulthonuladib
Copy link

@lrlineroa you can see at my pull request on this repo for not working examples

@joneldiablo
Copy link
Owner

sorry, I have not see your comments, I'm going to rebuild and make better documentation soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants