MatteoGioioso / MatteoGioioso/serverless-pg

serverless-pg with Netlify

Open
#70 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
JavaScript
Stars
324
Forks
16
PR merge metrics
No merged PRs in 30d

Description

I'm using Netlify functions for serverless

When I tried `serverless-pg` I had the following error:
```
[ERROR] Could not resolve "pg-native"
node_modules/pg/lib/native/client.js:4:21:
4 │ var Native = require('pg-native')
```

So I installed pg-native, working well locally but then I have the following error with deploy: https://answers.netlify.com/t/unable-to-publish-function-using-postgres/12293

Do you have an install with Netlify? How can I fix the error with libpq?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Netlify function deployment using serverless-pg and the pg-native dependency, then inspect node_modules/pg/lib/native/client.js and the linked Netlify deployment report for the libpq failure. Done means the function deploys and connects to PostgreSQL on Netlify without the pg-native resolution or libpq error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs, postgresql
Domain
backend, cloud, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.