ModuleNotFoundError: Module not found: Error: Can't resolve 'pnpapi' in '/home/torch/Desktop/Fresh/Renderpub-Auth/nextjs-cognito-auth-javascript-master/node_modules/next/dist/lib'
Build error occurred
Error: > Build failed because of webpack errors
at build (/home/torch/Desktop/Fresh/Renderpub-Auth/nextjs-cognito-auth-javascript-master/node_modules/next/dist/build/index.js:15:918)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:93:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! dev-pub@0.1.0 build: next build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the dev-pub@0.1.0 build script.
I tried to build and deploy this project.
There is no problem running development env but it fails in production.
Even after installing the module pnpapi it fails.
ModuleNotFoundError: Module not found: Error: Can't resolve 'pnpapi' in '/home/torch/Desktop/Fresh/Renderpub-Auth/nextjs-cognito-auth-javascript-master/node_modules/next/dist/lib'
I tried to build and deploy this project. There is no problem running development env but it fails in production. Even after installing the module pnpapi it fails.