I’m stuck to deploy my Next/Express app on Netlify.
The app works fine locally but when I want to build on using Netlify lambda function it doesn’t work.
Here my git repos for some test :
(use npm install first and npm run dev)
If I only use
next build script, the app can be deployed but I can’t use express but if I use the Netlify script
netlify-lambda build (src/directory) I get this error:
Can’t resolve ‘pnpapi’ in ‘…/Express_Next/node_modules/pnp-webpack-plugin’
If I use the basically script server.js (without next configuration) it works but not locally.
When I build create-react-app with Express it works but I want to use Next.js + Express.js.