Error: Cannot find module 'pg'

plesae i wanna put a question.

i tried to deploy single js file.
but i couldnt do it.

nodejs i use.

error code is
Cannot find module ‘pg’

i put a js file like below.

const {Client} = require(“pg”);

before post it,there had more code.but this error appeard,then i deleted some probably extravagant code from js file.

but error was still yet.
at last just one sentence was left,but error has been there.

i want to deploy database trial program.

how do i find ‘pg’?

Hey,

Are you installing dependencies on the build step via the ‘build command’? (like ‘npm install’ or ‘yarn’)

Jérémy.
Render Support, UTC+3

1 Like

i wasnt installing pg to RENDER.COM.
i assumed that RENDER.COM has already installed “pg”.

but it didnt.

thank you to reply.
if i get into trouble next ,please give your cooperation.