seldebrings / next-cognito-ssr-auth

NextJS SSR AWS Cognito JWT Authentication
9 stars 2 forks source link

Build fails , Module not found error 'pnpapi' #5

Open Rashmi-278 opened 3 years ago

Rashmi-278 commented 3 years ago

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.

Rashmi-278 commented 3 years ago

https://github.com/vercel/next.js/issues/18969