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

Introspect error #277

Closed
pencilcheck opened this issue Dec 30, 2023 · 8 comments
Closed

Introspect error #277

pencilcheck opened this issue Dec 30, 2023 · 8 comments
Assignees

Comments

@pencilcheck
Copy link

drizzle-kit: v0.20.9
drizzle-orm: v0.29.2

No config path provided, using default path
Reading config file '/drizzle.config.ts'
(node:70457) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
[✓] 69  tables fetched
[✓] 510 columns fetched
[✓] 9   enums fetched
[✓] 0   indexes fetched
[✓] 15  foreign keys fetched

/node_modules/drizzle-kit/bin.cjs:4239
      const tables = Object.values(schema4.tables);
                                           ^

TypeError: Cannot read properties of undefined (reading 'tables')
    at schema (/node_modules/drizzle-kit/bin.cjs:4239:44)
    at writeResult (/node_modules/drizzle-kit/bin.cjs:15202:21)
    at Command.<anonymous> (/node_modules/drizzle-kit/bin.cjs:63497:5)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.10.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@lxia1220
Copy link

writeResult was changed to accept an object as an argument, but this was not applied to introspect. (migrate functions are using correctly)

image

you can temp fix it with the code below.

    writeResult({
      cur: schema4,
      sqlStatements,
      journal,
      _meta,
      outFolder: validatedConfig.out,
      breakpoints: validatedConfig.breakpoints,
      type: "introspect"
    });

@pencilcheck
Copy link
Author

writeResult was changed to accept an object as an argument, but this was not applied to introspect. (migrate functions are using correctly)

image you can temp fix it with the code below.
    writeResult({
      cur: schema4,
      sqlStatements,
      journal,
      _meta,
      outFolder: validatedConfig.out,
      breakpoints: validatedConfig.breakpoints,
      type: "introspect"
    });

Thanks. Do you know the rough version number that this fix might be merged in? Or is it not planned? Seeing this error always makes it uneasy when making instropsect

@lxia1220
Copy link

lxia1220 commented Jan 1, 2024

writeResult was changed to accept an object as an argument, but this was not applied to introspect. (migrate functions are using correctly)
image
you can temp fix it with the code below.

    writeResult({
      cur: schema4,
      sqlStatements,
      journal,
      _meta,
      outFolder: validatedConfig.out,
      breakpoints: validatedConfig.breakpoints,
      type: "introspect"
    });

Thanks. Do you know the rough version number that this fix might be merged in? Or is it not planned? Seeing this error always makes it uneasy when making instropsect

I still don't know when drizzle-kit will reflect this. I am using pnpm patch to �fix several errors.

@AndriiSherman
Copy link
Member

will be fixed today

@AndriiSherman AndriiSherman self-assigned this Jan 2, 2024
@AndriiSherman
Copy link
Member

should be fixed in drizzle-kit@beta. Can you check it please?

@nazif786
Copy link

nazif786 commented Jan 3, 2024

should be fixed in drizzle-kit@beta. Can you check it please?

it's fixed now

@AndriiSherman
Copy link
Member

Fixed in drizzle-kit@0.20.10

@pencilcheck
Copy link
Author

I will try once I have the opportunity. I am glad someone else is confirming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants