Home
Support Forums

Netlify with Next.js + Mongodb + Mongoose

Hey team,

I started to play with Netlify and I would love to deploy my app on it. So I built it with nextjs and mongoose/mongodb.
I can use the app without any problem on local.
But when I try to deploy it on production, it does not work.

To implement MongoDB I used this tutorial: Adding MongoDB (Mongoose) to Next.js APIs - DEV Community

here the error when I deploy it:

9:40:24 PM: 50:25  Warning: passHref is missing. See https://nextjs.org/docs/messages/link-passhref  @next/next/link-passhref
9:40:24 PM: info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
9:40:24 PM: info  - Creating an optimized production build...
9:41:13 PM: warn  - Compiled with warnings
9:41:13 PM: ./node_modules/mongodb/lib/bson.js
9:41:13 PM: Module not found: Can't resolve 'bson-ext' in '/opt/build/repo/node_modules/mongodb/lib'
9:41:13 PM: Import trace for requested module:
9:41:13 PM: ./node_modules/mongodb/lib/index.js
9:41:13 PM: ./node_modules/mongoose/lib/index.js
9:41:13 PM: ./node_modules/mongoose/index.js
9:41:13 PM: ./components/GridList.js
9:41:13 PM: ./pages/find-expert/[technology].js
9:41:13 PM: ./node_modules/next/dist/build/webpack/loaders/next-serverless-loader/index.js?page=%2Ffind-expert%2F%5Btechnology%5D&absolutePagePath=private-next-pages%2Ffind-expert%2F%5Btechnology%5D.js&absoluteAppPath=private-next-pages%2F_app.js&absoluteDocumentPath=next%2Fdist%2Fpages%2F_document&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&absolute404Path=&distDir=private-dot-next&buildId=-EFrXRfC15Vb_btRQB-D8&assetPrefix=&generateEtags=true&poweredByHeader=true&canonicalBase=&basePath=&runtimeConfig=&previewProps=%7B%22previewModeId%22%3A%222c5aa81d8bf1da6a5cfdd300590bdd31%22%2C%22previewModeSigningKey%22%3A%2275c1bc7f5a66beadd2615aedb8f45cc47035c7fe87dca2718e87809b6d115e45%22%2C%22previewModeEncryptionKey%22%3A%223aca40754442ac8044c9968c4c3783a4e5b5dbbac01cdbe92b534de9dbd29ee5%22%7D&loadedEnvFiles=W10%3D&i18n=!
9:41:13 PM: ./node_modules/mongodb/lib/deps.js
9:41:13 PM: Module not found: Can't resolve 'kerberos' in '/opt/build/repo/node_modules/mongodb/lib'
9:41:13 PM: Import trace for requested module:
9:41:13 PM: ./node_modules/mongodb/lib/index.js
9:41:13 PM: ./node_modules/mongoose/lib/index.js
9:41:13 PM: ./node_modules/mongoose/index.js
9:41:13 PM: ./components/GridList.js
9:41:13 PM: ./pages/find-expert/[technology].js
9:41:13 PM: ./node_modules/next/dist/build/webpack/loaders/next-serverless-loader/index.js?page=%2Ffind-expert%2F%5Btechnology%5D&absolutePagePath=private-next-pages%2Ffind-expert%2F%5Btechnology%5D.js&absoluteAppPath=private-next-pages%2F_app.js&absoluteDocumentPath=next%2Fdist%2Fpages%2F_document&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&absolute404Path=&distDir=private-dot-next&buildId=-EFrXRfC15Vb_btRQB-D8&assetPrefix=&generateEtags=true&poweredByHeader=true&canonicalBase=&basePath=&runtimeConfig=&previewProps=%7B%22previewModeId%22%3A%222c5aa81d8bf1da6a5cfdd300590bdd31%22%2C%22previewModeSigningKey%22%3A%2275c1bc7f5a66beadd2615aedb8f45cc47035c7fe87dca2718e87809b6d115e45%22%2C%22previewModeEncryptionKey%22%3A%223aca40754442ac8044c9968c4c3783a4e5b5dbbac01cdbe92b534de9dbd29ee5%22%7D&loadedEnvFiles=W10%3D&i18n=!
9:41:13 PM: ./node_modules/mongodb/lib/deps.js
9:41:13 PM: Module not found: Can't resolve 'snappy' in '/opt/build/repo/node_modules/mongodb/lib'
9:41:13 PM: Import trace for requested module:
9:41:13 PM: ./node_modules/mongodb/lib/index.js
9:41:13 PM: ./node_modules/mongoose/lib/index.js
9:41:13 PM: ./node_modules/mongoose/index.js
9:41:13 PM: ./components/GridList.js
9:41:13 PM: ./pages/find-expert/[technology].js
9:41:13 PM: ./node_modules/next/dist/build/webpack/loaders/next-serverless-loader/index.js?page=%2Ffind-expert%2F%5Btechnology%5D&absolutePagePath=private-next-pages%2Ffind-expert%2F%5Btechnology%5D.js&absoluteAppPath=private-next-pages%2F_app.js&absoluteDocumentPath=next%2Fdist%2Fpages%2F_document&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&absolute404Path=&distDir=private-dot-next&buildId=-EFrXRfC15Vb_btRQB-D8&assetPrefix=&generateEtags=true&poweredByHeader=true&canonicalBase=&basePath=&runtimeConfig=&previewProps=%7B%22previewModeId%22%3A%222c5aa81d8bf1da6a5cfdd300590bdd31%22%2C%22previewModeSigningKey%22%3A%2275c1bc7f5a66beadd2615aedb8f45cc47035c7fe87dca2718e87809b6d115e45%22%2C%22previewModeEncryptionKey%22%3A%223aca40754442ac8044c9968c4c3783a4e5b5dbbac01cdbe92b534de9dbd29ee5%22%7D&loadedEnvFiles=W10%3D&i18n=!
9:41:13 PM: ./node_modules/mongodb/lib/deps.js
9:41:13 PM: Module not found: Can't resolve 'snappy/package.json' in '/opt/build/repo/node_modules/mongodb/lib'
9:41:13 PM: Import trace for requested module:
9:41:13 PM: ./node_modules/mongodb/lib/index.js
9:41:13 PM: ./node_modules/mongoose/lib/index.js
9:41:13 PM: ./node_modules/mongoose/index.js
9:41:13 PM: ./components/GridList.js
9:41:13 PM: ./pages/find-expert/[technology].js
9:41:13 PM: ./node_modules/next/dist/build/webpack/loaders/next-serverless-loader/index.js?page=%2Ffind-expert%2F%5Btechnology%5D&absolutePagePath=private-next-pages%2Ffind-expert%2F%5Btechnology%5D.js&absoluteAppPath=private-next-pages%2F_app.js&absoluteDocumentPath=next%2Fdist%2Fpages%2F_document&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&absolute404Path=&distDir=private-dot-next&buildId=-EFrXRfC15Vb_btRQB-D8&assetPrefix=&generateEtags=true&poweredByHeader=true&canonicalBase=&basePath=&runtimeConfig=&previewProps=%7B%22previewModeId%22%3A%222c5aa81d8bf1da6a5cfdd300590bdd31%22%2C%22previewModeSigningKey%22%3A%2275c1bc7f5a66beadd2615aedb8f45cc47035c7fe87dca2718e87809b6d115e45%22%2C%22previewModeEncryptionKey%22%3A%223aca40754442ac8044c9968c4c3783a4e5b5dbbac01cdbe92b534de9dbd29ee5%22%7D&loadedEnvFiles=W10%3D&i18n=!
9:41:13 PM: ./node_modules/mongodb/lib/deps.js
9:41:13 PM: Module not found: Can't resolve 'aws4' in '/opt/build/repo/node_modules/mongodb/lib'
9:41:13 PM: Import trace for requested module:
9:41:13 PM: ./node_modules/mongodb/lib/index.js
9:41:13 PM: ./node_modules/mongoose/lib/index.js
9:41:13 PM: ./node_modules/mongoose/index.js
9:41:13 PM: ./components/GridList.js
9:41:13 PM: ./pages/find-expert/[technology].js
9:41:13 PM: ./node_modules/next/dist/build/webpack/loaders/next-serverless-loader/index.js?page=%2Ffind-expert%2F%5Btechnology%5D&absolutePagePath=private-next-pages%2Ffind-expert%2F%5Btechnology%5D.js&absoluteAppPath=private-next-pages%2F_app.js&absoluteDocumentPath=next%2Fdist%2Fpages%2F_document&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&absolute404Path=&distDir=private-dot-next&buildId=-EFrXRfC15Vb_btRQB-D8&assetPrefix=&generateEtags=true&poweredByHeader=true&canonicalBase=&basePath=&runtimeConfig=&previewProps=%7B%22previewModeId%22%3A%222c5aa81d8bf1da6a5cfdd300590bdd31%22%2C%22previewModeSigningKey%22%3A%2275c1bc7f5a66beadd2615aedb8f45cc47035c7fe87dca2718e87809b6d115e45%22%2C%22previewModeEncryptionKey%22%3A%223aca40754442ac8044c9968c4c3783a4e5b5dbbac01cdbe92b534de9dbd29ee5%22%7D&loadedEnvFiles=W10%3D&i18n=!
9:41:13 PM: ./node_modules/mongodb/lib/encrypter.js
9:41:13 PM: Module not found: Can't resolve 'mongodb-client-encryption' in '/opt/build/repo/node_modules/mongodb/lib'
9:41:13 PM: Import trace for requested module:
9:41:13 PM: ./node_modules/mongodb/lib/connection_string.js
9:41:13 PM: ./node_modules/mongodb/lib/mongo_client.js
9:41:13 PM: ./node_modules/mongodb/lib/index.js
9:41:13 PM: ./node_modules/mongoose/lib/index.js
9:41:13 PM: ./node_modules/mongoose/index.js
9:41:13 PM: ./components/GridList.js
9:41:13 PM: ./pages/find-expert/[technology].js
9:41:13 PM: ./node_modules/next/dist/build/webpack/loaders/next-serverless-loader/index.js?page=%2Ffind-expert%2F%5Btechnology%5D&absolutePagePath=private-next-pages%2Ffind-expert%2F%5Btechnology%5D.js&absoluteAppPath=private-next-pages%2F_app.js&absoluteDocumentPath=next%2Fdist%2Fpages%2F_document&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&absolute404Path=&distDir=private-dot-next&buildId=-EFrXRfC15Vb_btRQB-D8&assetPrefix=&generateEtags=true&poweredByHeader=true&canonicalBase=&basePath=&runtimeConfig=&previewProps=%7B%22previewModeId%22%3A%222c5aa81d8bf1da6a5cfdd300590bdd31%22%2C%22previewModeSigningKey%22%3A%2275c1bc7f5a66beadd2615aedb8f45cc47035c7fe87dca2718e87809b6d115e45%22%2C%22previewModeEncryptionKey%22%3A%223aca40754442ac8044c9968c4c3783a4e5b5dbbac01cdbe92b534de9dbd29ee5%22%7D&loadedEnvFiles=W10%3D&i18n=!
9:41:13 PM: ./node_modules/mongodb/lib/bson.js
9:41:13 PM: Module not found: Can't resolve 'bson-ext' in '/opt/build/repo/node_modules/mongodb/lib'
9:41:13 PM: Import trace for requested module:
9:41:13 PM: ./node_modules/mongodb/lib/index.js
9:41:13 PM: ./node_modules/mongoose/lib/index.js
9:41:13 PM: ./node_modules/mongoose/index.js
9:41:13 PM: ./models/agency.js
9:41:13 PM: ./pages/api/hello.js
9:41:13 PM: ./node_modules/next/dist/build/webpack/loaders/next-serverless-loader/index.js?page=%2Fapi%2Fhello&absolutePagePath=private-next-pages%2Fapi%2Fhello.js&absoluteAppPath=private-next-pages%2F_app.js&absoluteDocumentPath=next%2Fdist%2Fpages%2F_document&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&absolute404Path=&distDir=private-dot-next&buildId=-EFrXRfC15Vb_btRQB-D8&assetPrefix=&generateEtags=true&poweredByHeader=true&canonicalBase=&basePath=&runtimeConfig=&previewProps=%7B%22previewModeId%22%3A%222c5aa81d8bf1da6a5cfdd300590bdd31%22%2C%22previewModeSigningKey%22%3A%2275c1bc7f5a66beadd2615aedb8f45cc47035c7fe87dca2718e87809b6d115e45%22%2C%22previewModeEncryptionKey%22%3A%223aca40754442ac8044c9968c4c3783a4e5b5dbbac01cdbe92b534de9dbd29ee5%22%7D&loadedEnvFiles=W10%3D&i18n=!
9:41:13 PM: ./node_modules/mongodb/lib/deps.js
9:41:13 PM: Module not found: Can't resolve 'kerberos' in '/opt/build/repo/node_modules/mongodb/lib'
9:41:13 PM: Import trace for requested module:
9:41:13 PM: ./node_modules/mongodb/lib/index.js
9:41:13 PM: ./node_modules/mongoose/lib/index.js
9:41:13 PM: ./node_modules/mongoose/index.js
9:41:13 PM: ./models/agency.js
9:41:13 PM: ./pages/api/hello.js
9:41:13 PM: ./node_modules/next/dist/build/webpack/loaders/next-serverless-loader/index.js?page=%2Fapi%2Fhello&absolutePagePath=private-next-pages%2Fapi%2Fhello.js&absoluteAppPath=private-next-pages%2F_app.js&absoluteDocumentPath=next%2Fdist%2Fpages%2F_document&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&absolute404Path=&distDir=private-dot-next&buildId=-EFrXRfC15Vb_btRQB-D8&assetPrefix=&generateEtags=true&poweredByHeader=true&canonicalBase=&basePath=&runtimeConfig=&previewProps=%7B%22previewModeId%22%3A%222c5aa81d8bf1da6a5cfdd300590bdd31%22%2C%22previewModeSigningKey%22%3A%2275c1bc7f5a66beadd2615aedb8f45cc47035c7fe87dca2718e87809b6d115e45%22%2C%22previewModeEncryptionKey%22%3A%223aca40754442ac8044c9968c4c3783a4e5b5dbbac01cdbe92b534de9dbd29ee5%22%7D&loadedEnvFiles=W10%3D&i18n=!
9:41:13 PM: ./node_modules/mongodb/lib/deps.js
9:41:13 PM: Module not found: Can't resolve 'snappy' in '/opt/build/repo/node_modules/mongodb/lib'
9:41:13 PM: Import trace for requested module:
9:41:13 PM: ./node_modules/mongodb/lib/index.js
9:41:13 PM: ./node_modules/mongoose/lib/index.js
9:41:13 PM: ./node_modules/mongoose/index.js
9:41:13 PM: ./models/agency.js
9:41:13 PM: ./pages/api/hello.js
9:41:13 PM: ./node_modules/next/dist/build/webpack/loaders/next-serverless-loader/index.js?page=%2Fapi%2Fhello&absolutePagePath=private-next-pages%2Fapi%2Fhello.js&absoluteAppPath=private-next-pages%2F_app.js&absoluteDocumentPath=next%2Fdist%2Fpages%2F_document&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&absolute404Path=&distDir=private-dot-next&buildId=-EFrXRfC15Vb_btRQB-D8&assetPrefix=&generateEtags=true&poweredByHeader=true&canonicalBase=&basePath=&runtimeConfig=&previewProps=%7B%22previewModeId%22%3A%222c5aa81d8bf1da6a5cfdd300590bdd31%22%2C%22previewModeSigningKey%22%3A%2275c1bc7f5a66beadd2615aedb8f45cc47035c7fe87dca2718e87809b6d115e45%22%2C%22previewModeEncryptionKey%22%3A%223aca40754442ac8044c9968c4c3783a4e5b5dbbac01cdbe92b534de9dbd29ee5%22%7D&loadedEnvFiles=W10%3D&i18n=!
9:41:13 PM: ./node_modules/mongodb/lib/deps.js
9:41:13 PM: Module not found: Can't resolve 'snappy/package.json' in '/opt/build/repo/node_modules/mongodb/lib'
9:41:13 PM: Import trace for requested module:
9:41:13 PM: ./node_modules/mongodb/lib/index.js
9:41:13 PM: ./node_modules/mongoose/lib/index.js
9:41:13 PM: ./node_modules/mongoose/index.js
9:41:13 PM: ./models/agency.js
9:41:13 PM: ./pages/api/hello.js
9:41:13 PM: ./node_modules/next/dist/build/webpack/loaders/next-serverless-loader/index.js?page=%2Fapi%2Fhello&absolutePagePath=private-next-pages%2Fapi%2Fhello.js&absoluteAppPath=private-next-pages%2F_app.js&absoluteDocumentPath=next%2Fdist%2Fpages%2F_document&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&absolute404Path=&distDir=private-dot-next&buildId=-EFrXRfC15Vb_btRQB-D8&assetPrefix=&generateEtags=true&poweredByHeader=true&canonicalBase=&basePath=&runtimeConfig=&previewProps=%7B%22previewModeId%22%3A%222c5aa81d8bf1da6a5cfdd300590bdd31%22%2C%22previewModeSigningKey%22%3A%2275c1bc7f5a66beadd2615aedb8f45cc47035c7fe87dca2718e87809b6d115e45%22%2C%22previewModeEncryptionKey%22%3A%223aca40754442ac8044c9968c4c3783a4e5b5dbbac01cdbe92b534de9dbd29ee5%22%7D&loadedEnvFiles=W10%3D&i18n=!
9:41:13 PM: ./node_modules/mongodb/lib/deps.js
9:41:13 PM: Module not found: Can't resolve 'aws4' in '/opt/build/repo/node_modules/mongodb/lib'
9:41:13 PM: Import trace for requested module:
9:41:13 PM: ./node_modules/mongodb/lib/index.js
9:41:13 PM: ./node_modules/mongoose/lib/index.js
9:41:13 PM: ./node_modules/mongoose/index.js
9:41:13 PM: ./models/agency.js
9:41:13 PM: ./pages/api/hello.js
9:41:13 PM: ./node_modules/next/dist/build/webpack/loaders/next-serverless-loader/index.js?page=%2Fapi%2Fhello&absolutePagePath=private-next-pages%2Fapi%2Fhello.js&absoluteAppPath=private-next-pages%2F_app.js&absoluteDocumentPath=next%2Fdist%2Fpages%2F_document&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&absolute404Path=&distDir=private-dot-next&buildId=-EFrXRfC15Vb_btRQB-D8&assetPrefix=&generateEtags=true&poweredByHeader=true&canonicalBase=&basePath=&runtimeConfig=&previewProps=%7B%22previewModeId%22%3A%222c5aa81d8bf1da6a5cfdd300590bdd31%22%2C%22previewModeSigningKey%22%3A%2275c1bc7f5a66beadd2615aedb8f45cc47035c7fe87dca2718e87809b6d115e45%22%2C%22previewModeEncryptionKey%22%3A%223aca40754442ac8044c9968c4c3783a4e5b5dbbac01cdbe92b534de9dbd29ee5%22%7D&loadedEnvFiles=W10%3D&i18n=!
9:41:13 PM: ./node_modules/mongodb/lib/encrypter.js
9:41:13 PM: Module not found: Can't resolve 'mongodb-client-encryption' in '/opt/build/repo/node_modules/mongodb/lib'
9:41:13 PM: Import trace for requested module:
9:41:13 PM: ./node_modules/mongodb/lib/connection_string.js
9:41:13 PM: ./node_modules/mongodb/lib/mongo_client.js
9:41:13 PM: ./node_modules/mongodb/lib/index.js
9:41:13 PM: ./node_modules/mongoose/lib/index.js
9:41:13 PM: ./node_modules/mongoose/index.js
9:41:13 PM: ./models/agency.js
9:41:13 PM: ./pages/api/hello.js
9:41:13 PM: ./node_modules/next/dist/build/webpack/loaders/next-serverless-loader/index.js?page=%2Fapi%2Fhello&absolutePagePath=private-next-pages%2Fapi%2Fhello.js&absoluteAppPath=private-next-pages%2F_app.js&absoluteDocumentPath=next%2Fdist%2Fpages%2F_document&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&absolute404Path=&distDir=private-dot-next&buildId=-EFrXRfC15Vb_btRQB-D8&assetPrefix=&generateEtags=true&poweredByHeader=true&canonicalBase=&basePath=&runtimeConfig=&previewProps=%7B%22previewModeId%22%3A%222c5aa81d8bf1da6a5cfdd300590bdd31%22%2C%22previewModeSigningKey%22%3A%2275c1bc7f5a66beadd2615aedb8f45cc47035c7fe87dca2718e87809b6d115e45%22%2C%22previewModeEncryptionKey%22%3A%223aca40754442ac8044c9968c4c3783a4e5b5dbbac01cdbe92b534de9dbd29ee5%22%7D&loadedEnvFiles=W10%3D&i18n=!
9:41:13 PM: info  - Collecting page data...
9:41:18 PM: info  - Generating static pages (0/23)
9:41:19 PM: Unhandled error during request: Error: Request failed with status code 404
9:41:19 PM:     at createError (/opt/build/repo/.next/serverless/chunks/200.js:1100:15)
9:41:19 PM:     at settle (/opt/build/repo/.next/serverless/chunks/200.js:1380:12)
9:41:19 PM:     at IncomingMessage.handleStreamEnd (/opt/build/repo/.next/serverless/chunks/200.js:308:11)
9:41:19 PM:     at IncomingMessage.emit (node:events:402:35)
9:41:19 PM:     at endReadableNT (node:internal/streams/readable:1343:12)
9:41:19 PM:     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
9:41:19 PM:   config: {
9:41:19 PM:     transitional: {
9:41:19 PM:       silentJSONParsing: true,
9:41:19 PM:       forcedJSONParsing: true,
9:41:19 PM:       clarifyTimeoutError: false
9:41:19 PM:     },
9:41:19 PM:     adapter: [Function: httpAdapter],
9:41:19 PM:     transformRequest: [ [Function: transformRequest] ],
9:41:19 PM:     transformResponse: [ [Function: transformResponse] ],
9:41:19 PM:     timeout: 0,
9:41:19 PM:     xsrfCookieName: 'XSRF-TOKEN',
9:41:19 PM:     xsrfHeaderName: 'X-XSRF-TOKEN',
9:41:19 PM:     maxContentLength: -1,
9:41:19 PM:     maxBodyLength: -1,
9:41:19 PM:     validateStatus: [Function: validateStatus],
9:41:19 PM:     headers: {
9:41:19 PM:       Accept: 'application/json, text/plain, */*',
9:41:19 PM:       'Content-Type': 'application/json',
9:41:19 PM:       'User-Agent': 'axios/0.24.0',
9:41:19 PM:       'Content-Length': 25
9:41:19 PM:     },
9:41:19 PM:     method: 'post',
9:41:19 PM:     url: 'https://laughing-morse-0549e0.netlify.app/api/technology',
9:41:19 PM:     data: '{"technology":"Airtable"}'
9:41:19 PM:   },
9:41:19 PM:   request: <ref *1> ClientRequest {
9:41:19 PM:     _events: [Object: null prototype] {
9:41:19 PM:       abort: [Function (anonymous)],
9:41:19 PM:       aborted: [Function (anonymous)],
9:41:19 PM:       connect: [Function (anonymous)],
9:41:19 PM:       error: [Function (anonymous)],
9:41:19 PM:       socket: [Function (anonymous)],
9:41:19 PM:       timeout: [Function (anonymous)],
9:41:19 PM:       prefinish: [Function: requestOnPrefinish]
9:41:19 PM:     },
9:41:19 PM:     _eventsCount: 7,
9:41:19 PM:     _maxListeners: undefined,
9:41:19 PM:     outputData: [],
9:41:19 PM:     outputSize: 0,
9:41:19 PM:     writable: true,
9:41:19 PM:     destroyed: false,
9:41:19 PM:     _last: true,
9:41:19 PM:     chunkedEncoding: false,
9:41:19 PM:     shouldKeepAlive: false,
9:41:19 PM:     maxRequestsOnConnectionReached: false,
9:41:19 PM:     _defaultKeepAlive: true,
9:41:19 PM:     useChunkedEncodingByDefault: true,
9:41:19 PM:     sendDate: false,
9:41:19 PM:     _removedConnection: false,
9:41:19 PM:     _removedContLen: false,
9:41:19 PM:     _removedTE: false,
9:41:19 PM:     _contentLength: null,
9:41:19 PM:     _hasBody: true,
9:41:19 PM:     _trailer: '',
9:41:19 PM:     finished: true,
9:41:19 PM:     _headerSent: true,
9:41:19 PM:     _closed: false,
9:41:19 PM:     socket: TLSSocket {
9:41:19 PM:       _tlsOptions: [Object],
9:41:19 PM:       _secureEstablished: true,
9:41:19 PM:       _securePending: false,
9:41:19 PM:       _newSessionPending: false,
9:41:19 PM:       _controlReleased: true,
9:41:19 PM:       secureConnecting: false,
9:41:19 PM:       _SNICallback: null,
9:41:19 PM:       servername: 'laughing-morse-0549e0.netlify.app',
9:41:19 PM:       alpnProtocol: false,
9:41:19 PM:       authorized: true,
9:41:19 PM:       authorizationError: null,
9:41:19 PM:       encrypted: true,
9:41:19 PM:       _events: [Object: null prototype],
9:41:19 PM:       _eventsCount: 10,
9:41:19 PM:       connecting: false,
9:41:19 PM:       _hadError: false,
9:41:19 PM:       _parent: null,
9:41:19 PM:       _host: 'laughing-morse-0549e0.netlify.app',
9:41:19 PM:       _readableState: [ReadableState],
9:41:19 PM:       _maxListeners: undefined,
9:41:19 PM:       _writableState: [WritableState],
9:41:19 PM:       allowHalfOpen: false,
9:41:19 PM:       _sockname: null,
9:41:19 PM:       _pendingData: null,
9:41:19 PM:       _pendingEncoding: '',
9:41:19 PM:       server: undefined,
9:41:19 PM:       _server: null,
9:41:19 PM:       ssl: [TLSWrap],
9:41:19 PM:       _requestCert: true,
9:41:19 PM:       _rejectUnauthorized: true,
9:41:19 PM:       parser: null,
9:41:19 PM:       _httpMessage: [Circular *1],
9:41:19 PM:       [Symbol(res)]: [TLSWrap],
9:41:19 PM:       [Symbol(verified)]: true,
9:41:19 PM:       [Symbol(pendingSession)]: null,
9:41:19 PM:       [Symbol(async_id_symbol)]: 12,
9:41:19 PM:       [Symbol(kHandle)]: [TLSWrap],
9:41:19 PM:       [Symbol(kSetNoDelay)]: false,
9:41:19 PM:       [Symbol(lastWriteQueueSize)]: 0,
9:41:19 PM:       [Symbol(timeout)]: null,
9:41:19 PM:       [Symbol(kBuffer)]: null,
9:41:19 PM:       [Symbol(kBufferCb)]: null,
9:41:19 PM:       [Symbol(kBufferGen)]: null,
9:41:19 PM:       [Symbol(kCapture)]: false,
9:41:19 PM:       [Symbol(kBytesRead)]: 0,
9:41:19 PM:       [Symbol(kBytesWritten)]: 0,
9:41:19 PM:       [Symbol(connect-options)]: [Object],
9:41:19 PM:       [Symbol(RequestTimeout)]: undefined
9:41:19 PM:     },
9:41:19 PM:     _header: 'POST /api/technology HTTP/1.1\r\n' +
9:41:19 PM:       'Accept: application/json, text/plain, */*\r\n' +
9:41:19 PM:       'Content-Type: application/json\r\n' +
9:41:19 PM:       'User-Agent: axios/0.24.0\r\n' +
9:41:19 PM:       'Content-Length: 25\r\n' +
9:41:19 PM:       'Host: laughing-morse-0549e0.netlify.app\r\n' +
9:41:19 PM:       'Connection: close\r\n' +
9:41:19 PM:       '\r\n',
9:41:19 PM:     _keepAliveTimeout: 0,
9:41:19 PM:     _onPendingData: [Function: nop],
9:41:19 PM:     agent: Agent {
9:41:19 PM:       _events: [Object: null prototype],
9:41:19 PM:       _eventsCount: 2,
9:41:19 PM:       _maxListeners: undefined,
9:41:19 PM:       defaultPort: 443,
9:41:19 PM:       protocol: 'https:',
9:41:19 PM:       options: [Object: null prototype],
9:41:19 PM:       requests: [Object: null prototype] {},
9:41:19 PM:       sockets: [Object: null prototype],
9:41:19 PM:       freeSockets: [Object: null prototype] {},
9:41:19 PM:       keepAliveMsecs: 1000,
9:41:19 PM:       keepAlive: false,
9:41:19 PM:       maxSockets: Infinity,
9:41:19 PM:       maxFreeSockets: 256,
9:41:19 PM:       scheduling: 'lifo',
9:41:19 PM:       maxTotalSockets: Infinity,
9:41:19 PM:       totalSocketCount: 1,
9:41:19 PM:       maxCachedSessions: 100,
9:41:19 PM:       _sessionCache: [Object],
9:41:19 PM:       [Symbol(kCapture)]: false
9:41:19 PM:     },
9:41:19 PM:     socketPath: undefined,
9:41:19 PM:     method: 'POST',
9:41:19 PM:     maxHeaderSize: undefined,
9:41:19 PM:     insecureHTTPParser: undefined,
9:41:19 PM:     path: '/api/technology',
9:41:19 PM:     _ended: true,
9:41:19 PM:     res: IncomingMessage {
9:41:19 PM:       _readableState: [ReadableState],
9:41:19 PM:       _events: [Object: null prototype],
9:41:19 PM:       _eventsCount: 3,
9:41:19 PM:       _maxListeners: undefined,
9:41:19 PM:       socket: [TLSSocket],
9:41:19 PM:       httpVersionMajor: 1,
9:41:19 PM:       httpVersionMinor: 1,
9:41:19 PM:       httpVersion: '1.1',
9:41:19 PM:       complete: true,
9:41:19 PM:       rawHeaders: [Array],
9:41:19 PM:       rawTrailers: [],
9:41:19 PM:       aborted: false,
9:41:19 PM:       upgrade: false,
9:41:19 PM:       url: '',
9:41:19 PM:       method: null,
9:41:19 PM:       statusCode: 404,
9:41:19 PM:       statusMessage: 'Not Found',
9:41:19 PM:       client: [TLSSocket],
9:41:19 PM:       _consuming: true,
9:41:19 PM:       _dumped: false,
9:41:19 PM:       req: [Circular *1],
9:41:19 PM:       responseUrl: 'https://laughing-morse-0549e0.netlify.app/api/technology',
9:41:19 PM:       redirects: [],
9:41:19 PM:       [Symbol(kCapture)]: false,
9:41:19 PM:       [Symbol(kHeaders)]: [Object],
9:41:19 PM:       [Symbol(kHeadersCount)]: 16,
9:41:19 PM:       [Symbol(kTrailers)]: null,
9:41:19 PM:       [Symbol(kTrailersCount)]: 0,
9:41:19 PM:       [Symbol(RequestTimeout)]: undefined
9:41:19 PM:     },
9:41:19 PM:     aborted: false,
9:41:19 PM:     timeoutCb: null,
9:41:19 PM:     upgradeOrConnect: false,
9:41:19 PM:     parser: null,
9:41:19 PM:     maxHeadersCount: null,
9:41:19 PM:     reusedSocket: false,
9:41:19 PM:     host: 'laughing-morse-0549e0.netlify.app',
9:41:19 PM:     protocol: 'https:',
9:41:19 PM:     _redirectable: Writable {
9:41:19 PM:       _writableState: [WritableState],
9:41:19 PM:       _events: [Object: null prototype],
9:41:19 PM:       _eventsCount: 2,
9:41:19 PM:       _maxListeners: undefined,
9:41:19 PM:       _options: [Object],
9:41:19 PM:       _ended: true,
9:41:19 PM:       _ending: true,
9:41:19 PM:       _redirectCount: 0,
9:41:19 PM:       _redirects: [],
9:41:19 PM:       _requestBodyLength: 25,
9:41:19 PM:       _requestBodyBuffers: [],
9:41:19 PM:       _onNativeResponse: [Function (anonymous)],
9:41:19 PM:       _currentRequest: [Circular *1],
9:41:19 PM:       _currentUrl: 'https://laughing-morse-0549e0.netlify.app/api/technology',
9:41:19 PM:       [Symbol(kCapture)]: false
9:41:19 PM:     },
9:41:19 PM:     [Symbol(kCapture)]: false,
9:41:19 PM:     [Symbol(kNeedDrain)]: false,
9:41:19 PM:     [Symbol(corked)]: 0,
9:41:19 PM:     [Symbol(kOutHeaders)]: [Object: null prototype] {
9:41:19 PM:       accept: [Array],
9:41:19 PM:       'content-type': [Array],
9:41:19 PM:       'user-agent': [Array],
9:41:19 PM:       'content-length': [Array],
9:41:19 PM:       host: [Array]
9:41:19 PM:     }
9:41:19 PM:   },
9:41:19 PM:   response: {
9:41:19 PM:     status: 404,
9:41:19 PM:     statusText: 'Not Found',
9:41:19 PM:     headers: {
9:41:19 PM:       'cache-control': 'public, max-age=0, must-revalidate',
9:41:19 PM:       'content-type': 'text/html; charset=utf-8',
9:41:19 PM:       date: 'Wed, 08 Dec 2021 20:41:19 GMT',
9:41:19 PM:       etag: '1638291964-ssl',
9:41:19 PM:       server: 'Netlify',
9:41:19 PM:       age: '0',
9:41:19 PM:       'x-nf-request-id': '01FPDWEWPV7CYJ36V45WCASV6M',
9:41:19 PM:       'transfer-encoding': 'chunked'
9:41:19 PM:     },
9:41:19 PM:     config: {
9:41:19 PM:       transitional: [Object],
9:41:19 PM:       adapter: [Function: httpAdapter],
9:41:19 PM:       transformRequest: [Array],
9:41:19 PM:       transformResponse: [Array],
9:41:19 PM:       timeout: 0,
9:41:19 PM:       xsrfCookieName: 'XSRF-TOKEN',
9:41:19 PM:       xsrfHeaderName: 'X-XSRF-TOKEN',
9:41:19 PM:       maxContentLength: -1,
9:41:19 PM:       maxBodyLength: -1,
9:41:19 PM:       validateStatus: [Function: validateStatus],
9:41:19 PM:       headers: [Object],
9:41:19 PM:       method: 'post',
9:41:19 PM:       url: 'https://laughing-morse-0549e0.netlify.app/api/technology',
9:41:19 PM:       data: '{"technology":"Airtable"}'
9:41:19 PM:     },
9:41:19 PM:     request: <ref *1> ClientRequest {
9:41:19 PM:       _events: [Object: null prototype],
9:41:19 PM:       _eventsCount: 7,
9:41:19 PM:       _maxListeners: undefined,
9:41:19 PM:       outputData: [],
9:41:19 PM:       outputSize: 0,
9:41:19 PM:       writable: true,
9:41:19 PM:       destroyed: false,
9:41:19 PM:       _last: true,
9:41:19 PM:       chunkedEncoding: false,
9:41:19 PM:       shouldKeepAlive: false,
9:41:19 PM:       maxRequestsOnConnectionReached: false,
9:41:19 PM:       _defaultKeepAlive: true,
9:41:19 PM:       useChunkedEncodingByDefault: true,
9:41:19 PM:       sendDate: false,
9:41:19 PM:       _removedConnection: false,
9:41:19 PM:       _removedContLen: false,
9:41:19 PM:       _removedTE: false,
9:41:19 PM:       _contentLength: null,
9:41:19 PM:       _hasBody: true,
9:41:19 PM:       _trailer: '',
9:41:19 PM:       finished: true,
9:41:19 PM:       _headerSent: true,
9:41:19 PM:       _closed: false,
9:41:19 PM:       socket: [TLSSocket],
9:41:19 PM:       _header: 'POST /api/technology HTTP/1.1\r\n' +
9:41:19 PM:         'Accept: application/json, text/plain, */*\r\n' +
9:41:19 PM:         'Content-Type: application/json\r\n' +
9:41:19 PM:         'User-Agent: axios/0.24.0\r\n' +
9:41:19 PM:         'Content-Length: 25\r\n' +
9:41:19 PM:         'Host: laughing-morse-0549e0.netlify.app\r\n' +
9:41:19 PM:         'Connection: close\r\n' +
9:41:19 PM:         '\r\n',
9:41:19 PM:       _keepAliveTimeout: 0,
9:41:19 PM:       _onPendingData: [Function: nop],
9:41:19 PM:       agent: [Agent],
9:41:19 PM:       socketPath: undefined,
9:41:19 PM:       method: 'POST',
9:41:19 PM:       maxHeaderSize: undefined,
9:41:19 PM:       insecureHTTPParser: undefined,
9:41:19 PM:       path: '/api/technology',
9:41:19 PM:       _ended: true,
9:41:19 PM:       res: [IncomingMessage],
9:41:19 PM:       aborted: false,
9:41:19 PM:       timeoutCb: null,
9:41:19 PM:       upgradeOrConnect: false,
9:41:19 PM:       parser: null,
9:41:19 PM:       maxHeadersCount: null,
9:41:19 PM:       reusedSocket: false,
9:41:19 PM:       host: 'laughing-morse-0549e0.netlify.app',
9:41:19 PM:       protocol: 'https:',
9:41:19 PM:       _redirectable: [Writable],
9:41:19 PM:       [Symbol(kCapture)]: false,
9:41:19 PM:       [Symbol(kNeedDrain)]: false,
9:41:19 PM:       [Symbol(corked)]: 0,
9:41:19 PM:       [Symbol(kOutHeaders)]: [Object: null prototype]
9:41:19 PM:     },

Can you help me? I’m sure I’ve done something stupid! But I’m still learning!
ps: I needed to cut the error because it is too long for the forum!

Hey @knandraina,

Is this related:

Having the same issue here, so I’m following this topic. :slight_smile:

Hey there @andylemaire :wave:

Can you share your site, repo, and most recent deploy log with us? Thanks.

Hey @hillary unfortunately I can’t share site/repo. The deploy log gives the same errors as above.

1 Like

In the past, it worked by upgrading the Netlify Next.js plugin. Have you done that? Would it be possible to share the site name?

@hrishikesh just andylemaire or do you need the domain?

I’m not specifying a specific version of Netlify Next.js plugin.
I have package = "@netlify/plugin-nextjs" in my netlify.toml file.

Yeah that’s enough.

So I can see you’re using the old v3 of the plugin. Updating that would be step 1 to check.

@hrishikesh since I’m not specifying a version in netlify.toml as you can see, how can I upgrade? Doesn’t it always take the latest version?

The migration guide is linked in the deploy logs:

https://app.netlify.com/sites/andylemaire/deploys/61bddfb777c31a0007559273#L143

Since a version can include breaking changes, we don’t want to auto-upgrade users’ sites and break them without their knowledge.

1 Like

Thanks for the help @hrishikesh !