Gatsby V3 Upgrade - Deploy Build Failing

Deploy URL: Netlify App
Deploy ID: 649b1fa66b56f6007db7165d

Context: branch-deploy (develop) - upgrade Gatsby v2 to v3
Deployment Type: CD Git (branch commit)
Last Broken Deploy URL: Netlify App
Last Successful Deploy URL: Netlify App

Hi,

I’m trying to upgrade our application to the latest Gatsby version. To minimize the potential impact I was hoping to upgrade from version 2 to 3 first (before moving on to 3->4 and 4->5). Currently, I’m working on our ‘develop’ branch and I’ve upgraded all of the gatsby packages and resolved the breaking changes (per the migrating-from-v2-to-v3 documentation) and the application builds and runs fine locally. However, the branch deploy/build on Netlify is failing in the “open and validate gatsby-configs” step with this error:

Error in “/opt/build/repo/node_modules/gatsby-plugin-eslint/gatsby-node.js”: Cannot find module ‘eslint-webpack-plugin’

I was hoping someone might have insight into what I can do to resolve this issue?

Additional info:

  1. gatsby.config.js:
    { plugins: [ { resolve: “gatsby-plugin-eslint”, options: { stages: [“develop”], extensions: [“js”, “jsx”], exclude: [“node_modules”, “.cache”, “public”] } } }
  1. Tried redeploying with clear cache option, but didn’t help.
  2. Tried moving “eslint-webpack-plugin” from devDependencies to dependencies, but didn’t help.
  3. .nvmrc set to 16.
  4. Package.json attached: package.zip (2.0 KB).

Thanks,
-Ken

You’ve set NODE_ENV production: Environment variables | Site configuration | be-web | Netlify

The missing dependency is: eslint-webpack-plugin which is in your devDependencies.

Thus the issue.

Side note: Please stop using netlify-lambda. It’s deprecated and shouldn’t be used. Netlify handles Function bundling itself.

That did the trick. Thank you for your help!

-Ken

glad to hear it. thanks for coming back and confirming you found a solution to your problem.