From ef8feae4bae08ff2ad832d21080c6d24b726b0a3 Mon Sep 17 00:00:00 2001 From: GatsbyJS Bot Date: Mon, 19 Apr 2021 15:58:39 -0400 Subject: [PATCH] fix(gatsby): "Cannot find module 'babel-preset-gatsby'" error (#30813) (#30946) (cherry picked from commit 97898232e98e59926f39a711e263cf999ddc37ca) Co-authored-by: Jeremy Albright <1935258+Js-Brecht@users.noreply.github.com> --- packages/gatsby/src/utils/eslint-config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/gatsby/src/utils/eslint-config.ts b/packages/gatsby/src/utils/eslint-config.ts index 834327ff4f1af..6d42b22ac535b 100644 --- a/packages/gatsby/src/utils/eslint-config.ts +++ b/packages/gatsby/src/utils/eslint-config.ts @@ -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, }, @@ -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, },