[BUG]: Drizzle-Kit trying to read JSX file, resulting in unexpected token error.
bug
### 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.
<img width="719" height="245" alt="Image" src="https://github.com/user-attachments/assets/0a5aefa3-23c3-4c41-98ae-ba1e832d9cf8" />
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 (
<svg
role="img"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
{...props}
className={cn("fill-current", className)}
>
<title>Apple</title>
<path d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701" />
</svg>
);
};
```
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.
0 条评论