Comments (6)
I am using ^0.4.0 version of @vercel/postgres (in package.json)
from edge-config.
Thanks for the report @619. Before we can help, we'll need more context on the problem - ideally a minimal reproduction. We'll need to know things like:
- Node version
- Vercel CLI version
- The contents of the
package.json
- The contents of the
vercel.json
, if any. (this is not related to your.vercel
directory) - Your file structure and an example of the API handler
- How you are deploying the code - via git or via
vercel deploy
command?
To best help us solve the issue here, an exact reproduction published to Github would be great.
from edge-config.
Sure, I can do that. Is there a private means of doing so? I'm not pushing my code to a public repo. It would be even better if I can authenticate/allow you to look at my project on vercel so you can see everything yourself.
Node v: 18.16.0 (ran node -v locally)
Vercel CLI v: 29.3.1
package.json:
{
"name": "NAME",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@vercel/postgres": "^0.4.0",
"eslint": "8.44.0",
"eslint-config-next": "13.4.8",
"next": "^13.4.8",
"react": "18.2.0",
"react-dom": "18.2.0"
}
}
vercel.json: I can show you privately.
from edge-config.
Oh yes, I forgot to mention that I generated this project from the nextjs clone template on vercel.
from edge-config.
Update: I created another repo using the nextJS template on vercel, copied my code from api/redirect.js and vercel.json, installed @vercel/postgres using npm, and I got the same error. @vercel/postgres does indeed break in production.
from edge-config.
The issue was that I was using an import statement in a serverless function.
I was using:
import { sql } from '@vercel/postgres';
when I should have been using:
const { sql } = require('@vercel/postgres')
from edge-config.
Related Issues (20)
- Vercel Blob onBeforeGenerateToken clientPayload Type issue? HOT 3
- `@opentelemetry/api` dependency on `@vercel/edge-config` breaks edge function
- `@vercel/edge-config` still breaks even if `@opentelemetry/api` is marked as peer deps HOT 7
- [@vercel/postgres] - Error: VercelPostgresError - 'invalid_connection_string' using drizzle orm HOT 2
- x-axis visibility issue for extended columns in postgres table HOT 1
- [@vercel/postgres] - Error: syntax error at or near "$1" HOT 1
- pg.types.setTypeParser() not working with @vercel/postgres-kysely package HOT 1
- ReferenceError: TextDecoder is not defined While using blob storage in test cases HOT 3
- I have issue while integrating vercel blobs using server actions. HOT 4
- KV not flexible with Vercel Data Cache HOT 1
- hobby bandwidth limit HOT 1
- @vercel/blob `PutBlobResult.contentType` can be undefined
- Can't delete blob file. HOT 2
- Postgres: Cannot use type parser using `createPool` or `db.connect` HOT 1
- Vercel environment variable naming inconsistency with Vercel KV documentation HOT 1
- Broken Uploaded Images on Blob via Express Js HOT 2
- @vercel/blob - not possible to use `client` lib in node.js env HOT 8
- @vercel/blob - is it possible to cancel uploading a file? HOT 4
- @vercel/blob - Folder entry coming through as blob
- Upload/Download Progress on Vercel Blob HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edge-config.