Module not found: Can't resolve 'net'
Gibril1 opened this issue · comments
This is the error i get when i want to view pages in nextjs. How can i solve this
- error ./node_modules/postgres/src/connection.js:1:0
Module not found: Can't resolve 'net'
https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./node_modules/postgres/src/index.js
./constants.ts
./utils/authenticateUser.ts
./app/login/page.tsx
"net" is a node js standard library. I think you are trying to run this on the browser since you are referencing nextjs. This library does not work on browser. Unless you are trying to run this library with server side rendering with nextjs then you should go ask on nextjs repo.