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

pg return error #888

Closed
simpleblack opened this issue Aug 2, 2023 · 6 comments
Closed

pg return error #888

simpleblack opened this issue Aug 2, 2023 · 6 comments
Assignees

Comments

@simpleblack
Copy link

Error: 
  × Return statement is not allowed here
    ╭─[/node_modules/.pnpm/pg@8.11.1/node_modules/pg/lib/crypto/utils.js:4:1]
  4 │ if (useLegacyCrypto) {
  5 │   // We are on an old version of Node.js that requires legacy crypto utilities.
  6 │   module.exports = require('./utils-legacy')
  7 │   return
    ·   ──────
  8 │ }
  9 │ 
 10 │ const nodeCrypto = require('crypto')
    ╰────

I am using Next.js version 13.4.12 and pg-promise 11.5.2.
I encountered the following error.
What are the ways to resolve it?

@simpleblack simpleblack added the triage To be investigated label Aug 2, 2023
@vitaly-t
Copy link
Owner

vitaly-t commented Aug 2, 2023

I don't see how that issue is related to this library. That's a Next.js error, it does not come from pg-promise.

Maybe thee is some crypto-related issue in the underlying driver? Anyway, what version of NodeJS are you using?

@simpleblack
Copy link
Author

It seems that the issue is resolved in pg version 8.11.2. When can we expect the update from 8.11.1 to 8.11.2?

Thank you.

@vitaly-t
Copy link
Owner

vitaly-t commented Aug 2, 2023

Can you include details? The original issue, when it was introduced, when it was fixed.

@simpleblack
Copy link
Author

The information is available at the following link.
brianc/node-postgres#2980

@vitaly-t
Copy link
Owner

vitaly-t commented Aug 2, 2023

Released v11.5.3 with the updated driver 8.1.2.

@simpleblack See if the issue has been resolved, and if so - please close the issue ;)

@vitaly-t vitaly-t added dependency issue and removed triage To be investigated labels Aug 2, 2023
@simpleblack
Copy link
Author

Good 👍
Thank you.

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

No branches or pull requests

2 participants