drizzle-team / drizzle-team/drizzle-orm
[BUG]: Drizzle-Kit trying to read JSX file, resulting in unexpected token error.
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Report hasn't been filed before.
- [x] I have verified that the bug I'm about to report hasn't been filed before.
### What version of `drizzle-orm` are you using?
^1.0.0-beta.22
### What version of `drizzle-kit` are you using?
^1.0.0-beta.22
### Other packages
_No response_
### Describe the Bug
**Undesired Behavior**
Unable to execute any drizzle-kit CLI commands (e.g., generate, migrate, studio), causing an **unexpected token** errors as it trying to read files it shouldn't read.
Everything was normal, as soon as I added this specific file:
```typescript
import type React from "react";
import { cn } from "@/src/ui/shadcn/lib/utils";
export const Apple = ({ className, ...props }: React.ComponentProps<"svg">) => {
return (
);
};
```
I got that **Unexpected Token** error, as you can see that is just a normal JSX file which run perfectly fine in development server or when I run the build command.
I tried to browse my codebase, looking for the problem but nothing seems to fix the problem except to delete that JSX file.
When I delete the file, drizzle-kit working perfectly again.
As soon as I added that file again, the **unexpected token** error come back.
Update:
I'm sorry, but command **migrate and pull** is working fine, it seems that only commands that are required to read my schema are affected by it like **generate and somehow studio**.
Contributor guide
Assessment
This issue has not been assessed yet.