cant resolve module when building application
Unanswered
Savannah Sparrow posted this in #help-forum
Savannah SparrowOP
> telegram-bot-manager@0.1.0 build
> next build
▲ Next.js 15.3.1
- Environments: .env
⚠ The following reserved Next.js pages were detected not directly under the pages directory:
/pages/_app
See more info here: https://nextjs.org/docs/messages/nested-reserved-page
Creating an optimized production build ...
Failed to compile.
./node_modules/@paypal/paypalhttp/lib/paypalhttp/serializer/multipart.js
Module not found: Can't resolve 'fs'
https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./node_modules/@paypal/paypalhttp/lib/paypalhttp.js
./node_modules/@paypal/paypalhttp/index.js
./node_modules/@paypal/checkout-server-sdk/lib/core/paypal_environment.js
./node_modules/@paypal/checkout-server-sdk/lib/core/lib.js
./node_modules/@paypal/checkout-server-sdk/lib/lib.js
./node_modules/@paypal/checkout-server-sdk/index.js
./pages/pages/api/payment/capture.ts
> Build failed because of webpack errors
root@srv274858750:~/site#
anyone has an idea of how i can resolve this? i can't find any solid fix
4 Replies
Savannah SparrowOP
It does build on windows, but not on linux
Savannah SparrowOP
fixed it by making adjustments to next config
For some reason i can't close the thread
Spectacled bear
Please post your fix, it might be helpful to others, you can try to close the thread by doing to
hover over your answer > three dots > apps > marks as solution