Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]:The inferred type of X cannot be named without a reference to ../../../node_modules/drizzle-orm/sqlite-core/index.cjs #4026

Open
1 task done
huuyafwww opened this issue Jan 28, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@huuyafwww
Copy link

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.39.0

What version of drizzle-kit are you using?

0.30.3

Other packages

No response

Describe the Bug

I get a type error similar to #3732.

tsconfig.json is as follows.

{
  "compilerOptions": {
    "module": "esnext",
    "moduleResolution": "bundler",
    "declaration": true,
  },
  "include": ["src/**/*.ts"],
  "exclude": ["node_modules"]
}

I have shared table definitions as package in monorepo and I thought it was fixed by the 0.39.0 release but it was not cured.

It occurs when exporting a sqliteTable in sqlite-core.

import { sqliteTable, text } from 'drizzle-orm/sqlite-core';

export const user = sqliteTable('user', {
  id: text('id').primaryKey(),
});

If I set the declarations to false, it resolves the problem, but I would like this type error to be cured because I want to share table definitions as package in monorepo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant