Cannot find module 'pg'

I’m getting this error when I’m trying to install postgres in my local and onrender server.

This topic has been created from a Discord post (1240670734255390805) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

Error: Knex: run │
│ $ npm install pg --save │
│ Cannot find module ‘pg’