I am getting error while working with Nextjs app directory - error ./node_modules/@mapbox/node-pre-gyp/lib/clean.js:8:0 Module not found: Can't resolve 'fs' Import trace for requested module: ./node_modules/@mapbox/node-pre-gyp/lib/ sync ^\.\/.*$ ./node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js ./node_modules/argon2/argon2.js ./node_modules/next-auth-sanity/credentials.js ./node_modules/next-auth-sanity/index.js ./src/lib/auth.ts ./src/lib/index.ts ./src/app/upload/page.tsx
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 271
- Avg merge
- 23h 40m
- Merged PRs (30d)
- 2
Description
This issue has no description.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported Next.js app-directory build using the import trace in the issue. Inspect node_modules/@mapbox/node-pre-gyp/lib/clean.js and lib/node-pre-gyp.js, then trace the argon2 and next-auth-sanity imports. Done means the reported “Can't resolve 'fs'” error no longer occurs, with the relevant build behavior covered or clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nextjs, node.js
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100