Gatsby: Gatsby fails running when updating to new eslint 6.0.1

Created on 3 Jul 2019  路  11Comments  路  Source: gatsbyjs/gatsby

## Description

After updating my dependencies to the latest versions gatsby fails running and i get the following error message during startup.

Module build failed (from ./node_modules/eslint-loader/index.js):
Error: Cannot find module 'eslint/lib/formatters/stylish'
Require stack:
- ...../node_modules/eslint-loader/index.js
- ...../node_modules/loader-runner/lib/loadLoader.js
- ...../node_modules/loader-runner/lib/LoaderRunner.js
- ...../node_modules/gatsby/node_modules/webpack/lib/Norma
lModule.js
- ...../node_modules/gatsby/node_modules/webpack/lib/Norma
lModuleFactory.js
- ...../node_modules/gatsby/node_modules/webpack/lib/Compi
ler.js
- ...../node_modules/gatsby/node_modules/webpack/lib/webpa
ck.js
- ...../node_modules/gatsby/dist/commands/develop.js
- ...../node_modules/gatsby-cli/lib/create-cli.js
- ...../node_modules/gatsby-cli/lib/index.js
- ...../node_modules/gatsby/dist/bin/gatsby.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:625:15)

Steps to reproduce

  • update eslint dependencies to the latest versions.
  • run yarn dev

Environment

System:
OS: macOS High Sierra 10.13.2
CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
Shell: 5.3 - /bin/zsh
Binaries:
Node: 12.5.0 - /usr/local/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Browsers:
Chrome: 75.0.3770.100
Firefox: 66.0.5
Safari: 11.0.2
npmPackages:
gatsby: ^2.12.0 => 2.13.1
gatsby-image: ^2.2.3 => 2.2.4
gatsby-link: ^2.2.0 => 2.2.0
gatsby-plugin-catch-links: ^2.1.0 => 2.1.0
gatsby-plugin-eslint: ^2.0.5 => 2.0.5
gatsby-plugin-feed: ^2.3.1 => 2.3.1
gatsby-plugin-google-analytics: ^2.1.1 => 2.1.1
gatsby-plugin-manifest: ^2.2.0 => 2.2.1
gatsby-plugin-netlify: ^2.1.0 => 2.1.0
gatsby-plugin-nprogress: ^2.1.0 => 2.1.0
gatsby-plugin-offline: ^2.2.0 => 2.2.0
gatsby-plugin-page-transitions: ^1.0.8 => 1.0.8
gatsby-plugin-react-helmet: ^3.1.0 => 3.1.0
gatsby-plugin-root-import: ^2.0.5 => 2.0.5
gatsby-plugin-sass: ^2.1.0 => 2.1.0
gatsby-plugin-sharp: ^2.2.1 => 2.2.2
gatsby-plugin-sitemap: ^2.2.1 => 2.2.1
gatsby-plugin-svgr: ^2.0.2 => 2.0.2
gatsby-plugin-twitter: ^2.1.0 => 2.1.0
gatsby-plugin-web-font-loader: ^1.0.4 => 1.0.4
gatsby-source-filesystem: ^2.1.1 => 2.1.2
gatsby-source-wordpress: ^3.1.2 => 3.1.3
gatsby-transformer-sharp: ^2.2.0 => 2.2.1
npmGlobalPackages:
gatsby-cli: 2.4.7

breaking change maintenance

Most helpful comment

It looks like there's a fix to make eslint-loader support eslint 6. Once that fix is released we should be able to update the versions here .

All 11 comments

it looks like this is the same issue
https://github.com/vuejs/eslint-plugin-vue/issues/916#issuecomment-507800590

It looks like there's a fix to make eslint-loader support eslint 6. Once that fix is released we should be able to update the versions here .

eslint-loader is fine, I think we're now waiting on https://github.com/facebook/create-react-app/issues/7268

Hiya!

This issue has gone quiet. Spooky quiet. 馃懟

We get a lot of issues, so we currently close issues after 30 days of inactivity. It鈥檚 been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contributefor more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 馃挭馃挏

not stale - still waiting on https://github.com/facebook/create-react-app/issues/7268 which is fixed by https://github.com/facebook/create-react-app/pull/7415 so waiting on a release which should "be out in the next week"...

@wardpeet #16168 Actually did not fix support for ESLint 6. It has a commit specifically for not using 6.

Looking at the history of eslint-config-react-app support for ESLint 6 was added in [email protected]. Are there any plans on moving to that? Should I send a PR? If so, any hints on what I should look out for during upgrade?

Sadly we'll have to mark this as a breaking change and we won't be able to fix this in gatsby v2. Eslint 6 needs support for Node.js 8.10.0. We officially support node 8.0.0 so moving to eslint 6 will break.

You could setup yarn resolutions to fix this problem.

I'm going to close this as there is nothing we can do for it atm.

@wardpeet Ok, thanks for the update. Is there another issue tracking/target this for gatsby v3? Or should I submit a new one?

I've added it to the thread https://github.com/gatsbyjs/gatsby/issues/15277#issuecomment-527161120

Great, thanks @wardpeet

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mikestopcontinues picture mikestopcontinues  路  3Comments

benstr picture benstr  路  3Comments

rossPatton picture rossPatton  路  3Comments

timbrandin picture timbrandin  路  3Comments

brandonmp picture brandonmp  路  3Comments