Skip to content

Commit

Permalink
fix(gatsby): "Cannot find module 'babel-preset-gatsby'" error (#30813) (
Browse files Browse the repository at this point in the history
#30946)

(cherry picked from commit 9789823)

Co-authored-by: Jeremy Albright <[email protected]>
  • Loading branch information
GatsbyJS Bot and Js-Brecht authored Apr 19, 2021
1 parent 9fdfc57 commit ef8feae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/gatsby/src/utils/eslint-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const eslintRequiredConfig: ESLint.Options = {
// TODO proper check for custom babel & plugins config
// Currently when a babelrc is added to the project, it will override our babelOptions
babelOptions: {
presets: [`babel-preset-gatsby`],
presets: [require.resolve(`babel-preset-gatsby`)],
},
requireConfigFile: false,
},
Expand Down Expand Up @@ -63,7 +63,7 @@ export const eslintConfig = (
// TODO proper check for custom babel & plugins config
// Currently when a babelrc is added to the project, it will override our babelOptions
babelOptions: {
presets: [`babel-preset-gatsby`],
presets: [require.resolve(`babel-preset-gatsby`)],
},
requireConfigFile: false,
},
Expand Down

0 comments on commit ef8feae

Please sign in to comment.