Giter Club home page Giter Club logo

Comments (5)

markusahlstrand avatar markusahlstrand commented on September 13, 2024

Hi @honarpour,

It should work fine to use either the 0.21 or the 0.96 version of knex. I think the issue might be that there is not es-module version of this package but only a version for cjs. I'm not certain what would be needed to add support for es-modules?

from knex-data-api-client.

honarpour avatar honarpour commented on September 13, 2024

Hey @markusahlstrand!

For ES6 support could add Babel.
The thing is it worked when using Knex directly, that's why I thought might need to update the dependancy.
Main issue is if I refactor to CommonJS, then it throws error on the colons (:) for TS types, so can't do TS either.

from knex-data-api-client.

honarpour avatar honarpour commented on September 13, 2024

@markusahlstrand Yup that was the issue. I forked the repo and updated Knex to latest and am able to run migrations written in TypeScript and ES6 out of the box.

from knex-data-api-client.

markusahlstrand avatar markusahlstrand commented on September 13, 2024

@honarpour So just by updating the knex version it worked? I didn't want to bump it because then for instance objection won't work any longer. As it's just a peer dependency it should work fine with an app that has a newer version of knex installed as well.. Or am I missing something?

from knex-data-api-client.

honarpour avatar honarpour commented on September 13, 2024

Yeah updating version worked for migrations but importing Knex in Lambdas broke.
Seems like I was missing something... for some reason I got version clashes when installing the latest Knex in consuming project, but just tried it again and it's working everywhere!

from knex-data-api-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.