diff --git a/packages/gatsby-cli/src/handlers/plugin-add-utils.ts b/packages/gatsby-cli/src/handlers/plugin-add-utils.ts index fd61a58d87a54..e56cd3d845869 100644 --- a/packages/gatsby-cli/src/handlers/plugin-add-utils.ts +++ b/packages/gatsby-cli/src/handlers/plugin-add-utils.ts @@ -43,7 +43,7 @@ const addPluginToConfig = ( // Use the Babel TS preset if we're operating on `gatsby-config.ts` if (srcPath.endsWith(`ts`)) { - transformOptions.presets = [`@babel/preset-typescript`] + transformOptions.presets = [require.resolve(`@babel/preset-typescript`)] } code = transform(src, transformOptions)?.code diff --git a/yarn.lock b/yarn.lock index 1ba82e2814409..d276d811e7660 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11407,27 +11407,6 @@ gather-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/gather-stream/-/gather-stream-1.0.0.tgz#b33994af457a8115700d410f317733cbe7a0904b" -gatsby-core-utils@^3.8.2: - version "3.8.2" - resolved "https://registry.yarnpkg.com/gatsby-core-utils/-/gatsby-core-utils-3.8.2.tgz#9c2869f93a740d20536b1e92c8020efd85d43e5f" - integrity sha512-UwANr9yd8ayLinPDoRbU/rRgoOBOS715qe2LYCxq6hAtRabHWTEM8Vj0wh7LmyVGexx8MFgvp2NKikG2TZ5pzQ== - dependencies: - "@babel/runtime" "^7.15.4" - ci-info "2.0.0" - configstore "^5.0.1" - fastq "^1.13.0" - file-type "^16.5.3" - fs-extra "^10.0.0" - got "^11.8.3" - import-from "^4.0.0" - lmdb "^2.1.7" - lock "^1.1.0" - node-object-hash "^2.3.10" - proper-lockfile "^4.1.2" - resolve-from "^5.0.0" - tmp "^0.2.1" - xdg-basedir "^4.0.0" - gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -15177,7 +15156,7 @@ livereload-js@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-2.3.0.tgz#c3ab22e8aaf5bf3505d80d098cbad67726548c9a" -lmdb@^2.0.2, lmdb@^2.1.7, lmdb@^2.2.3, lmdb@^2.2.4: +lmdb@^2.0.2, lmdb@^2.2.3, lmdb@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/lmdb/-/lmdb-2.2.4.tgz#6494d5a1d1db152e0be759edcfa06893e4cbdb53" integrity sha512-gto+BB2uEob8qRiTlOq+R3uX0YNHsX9mjxj9Sbdue/LIKqu6IlZjrsjKeGyOMquc/474GEqFyX2pdytpydp0rQ==