porsager / porsager/postgres

Module not found: Can't resolve 'net'

Open
#776 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
8.7k
Forks
374
Avg merge
11d 16h
Merged PRs (30d)
1

Description

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

Contributor guide

No contributing guide indexed for this repository

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

Reproduce the Next.js page build from the import trace, starting at node_modules/postgres/src/connection.js and following constants.ts, utils/authenticateUser.ts, and app/login/page.tsx. Identify where the net import is bundled and verify a resolution by getting the page build to complete without the module-not-found error.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.