-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Environment
Knex version: 3.0.0
Database + version: postgres 15
OS: linux fedora 38
Select applicable template from below.
If issue is about oracledb support, tag @ atiertant. For MSSql tag @ smorey2.
Rest of dialects don't need tags.
If issue is about TypeScript definitions, tag @ lorefnon.
Bug
Running vitest with the new knex 3.0.0 fails while the same test works with 2.5.1
- Error message
`
❯ api/getSessionData/getSessionData.test.js (0 test)
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
FAIL api/getSessionData/getSessionData.test.js [ api/getSessionData/getSessionData.test.js ]
Error: Cannot find module '../../dialects'
Require stack:
- /home/user/dev/gb/gbweb/node_modules/knex/lib/knex-builder/internal/config-resolver.js
- /home/user/dev/gb/gbweb/node_modules/knex/lib/knex-builder/Knex.js
- /home/user/dev/gb/gbweb/node_modules/knex/lib/index.js
❯ Object. node_modules/knex/lib/knex-builder/internal/config-resolver.js:5:37
`
Looking at the specified folder show that in 3.0.0 there is no index.js and in 2.5.1 there is.
That explains why the require '../../dialects' fails in 3.0.0