drizzle-team / drizzle-team/drizzle-orm

[BUG]: Cannot find module error when import includes '.js' file extension in TypeScript project

Open
#2,705 23 comments 50 reactions 0 assignees View on GitHub
bug drizzle/kit priority
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### What version of `drizzle-orm` are you using?

0.32.1

### What version of `drizzle-kit` are you using?

0.23.0

### Describe the Bug

Attempting to generate a migration script fails with 'cannot find module' when a module path includes the '.js' file extension in TypeScript project. Similar issue, if not the same, https://github.com/drizzle-team/drizzle-orm/issues/849

Sample project to recreate the issue
https://github.com/Skulltulla/drizzle-kit-mirror-fork/tree/issues/drizzle-issues-0000

### Expected behavior

Generating a migration completes successfully when the module import path includes a '.js' file extension.

### Environment & setup

5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.