-
Notifications
You must be signed in to change notification settings - Fork 28.5k
Unable to get pg module to work #50921
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
Comments
This is an issue of that package, not related to Next.js: brianc/node-postgres#2980 |
This is hardly true.. It works just fine outside of Next.js. I also tried using pg-promise and slonik and none of those worked. |
As I noted in the linked issue, pg uses CommonJS modules, and top-level return is correct. pg will remove it, but this same bug will affect any other package that makes use of top-level return. |
I can't use pg-promise. Can you recommend a work-around? |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 Binaries: Node: 19.9.0 npm: 9.6.3 Yarn: N/A pnpm: 8.5.1 Relevant packages: next: 13.4.5-canary.6 eslint-config-next: 13.4.4 react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.3
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true)
Link to the code that reproduces this issue or a replay of the bug
N/A
To Reproduce
N/A
Describe the Bug
Expected Behavior
Expect https://www.npmjs.com/package/pg to work
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: