Skip to content

[BUG]: TypeScript build command throws error. #4955

@nirvikpurkait

Description

@nirvikpurkait

Report hasn't been filed before.

  • I have verified that the bug I'm about to report hasn't been filed before.

What version of drizzle-orm are you using?

0.44.6

What version of drizzle-kit are you using?

0.31.5

Other packages

[email protected], [email protected], [email protected]

Describe the Bug

  • What is the undesired behavior?
    When we execute tsc to generate build it throws error. (type related error)
  • What are the steps to reproduce it?
    Just run tsc on a TypeScript project to generate production build.
  • What is the desired result?
    When we execute tsc to generate build file, the project should be able to built without error.

  • What database engine are you using? Are you using a specific cloud provider? Which one?
    MySQL
  • Are you working in a monorepo?
    I was trying to implement to a monorepo, as I stumbled upon this error, tried to implement it with standalone testing repo, still error continues.
  • If this is a bug related to types: What Typescript version are you using? What's the content of your tsconfig.json file?
    Yes, [email protected]
// tsconfig.json

{
  "compilerOptions": {
    "target": "ES2020",
    "module": "esnext",
    "moduleResolution": "node",
    "outDir": "dist",
    "rootDir": "src",
    "baseUrl": "src",
    "paths": {
      "@/*": ["./*"]
    },
    "esModuleInterop": true,
    "strict": true
  },
  "include": ["src"]
}

Additionaly I am proving a codesandbox with generated error

https://codesandbox.io/p/devbox/4pz27h

The dev script fails for obvious reason, as no database is there in the sandbox. But locally the dev script works perfectly fine, only build script fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions