Comments (5)
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.
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.
@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.
@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.
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)
- when using `update.returning` types are not applied HOT 1
- Plans to work with AWS SDK for JavaScript (v3)? HOT 2
- The library does not close database transactions correctly
- Plans to update Knex dependency HOT 1
- update with returning not gettting data back HOT 5
- numbers in bindings should be strings HOT 2
- Postgres migrations broke on 1.4.1 HOT 6
- Cancelled
- Resolve with Bluebird Promise HOT 2
- Cannot find module 'knex/lib/transaction' HOT 17
- some properties don't exist when using typescript HOT 1
- Aurora MySQL Data API - migration fails on knex_migrations insert step HOT 6
- less documentation HOT 1
- How do we run migrations using the knex migration API ? HOT 1
- we are getting 'TypeError' when message property on error response is undefined HOT 3
- Incompatible with string array column types? HOT 3
- Insert of array fields broke in 1.6.2 HOT 1
- Value of infinity in timestamp columns breaks > v.1.5.0 HOT 8
- when using insert with returning *, record types are not applied HOT 2
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.
from knex-data-api-client.