Open dmathewwws opened 1 week ago
Indeed, same here
Seems to be the same error discussed here.
https://github.com/Kequc/knex-stringcase/issues/27
I'm a bit at a loss for what I'm supposed to be doing. I thought I set it up with CommonJS as a focus, but it is affecting more people than I expected. Can you guys see anywhere in the code that it can be improved?
Otherwise the solution seems to be somewhere here:
const knexStringcase - require('knex-stringcase');
const knexStringcase = require('knex-stringcase').default;
import knexStringcase from 'knex-stringcase';
import { default as knexStringcase } from 'knex-stringcase';
This worked for me:
import knex from 'knex';
import knexStringcase from 'knex-stringcase';
const db = knex({
client: 'mysql',
connection: {
host: '127.0.0.1',
user: 'your_database_user',
password: 'your_database_password',
database: 'myapp_test'
},
...knexStringcase.default(),
});
Yea. I'd really rather fix this. I think there's some Typescript configuration setting that needs to be on to avoid it, but I'd really rather not have to worry about it.
I could switch away from using a default export.
Hey,
Just checking if this example still works or has been changed because of the recent typescript changes.
I get the following error: knexStringcase is not a function when i try to run it