diff --git a/packages/gatsby-plugin-feed/package.json b/packages/gatsby-plugin-feed/package.json index 38c64f100048f..f48c3e2ae6c8b 100644 --- a/packages/gatsby-plugin-feed/package.json +++ b/packages/gatsby-plugin-feed/package.json @@ -10,7 +10,7 @@ "@babel/runtime": "^7.12.5", "@hapi/joi": "^15.1.1", "common-tags": "^1.8.0", - "fs-extra": "^8.1.0", + "fs-extra": "^9.1.0", "gatsby-plugin-utils": "^0.9.0", "lodash.merge": "^4.6.2", "rss": "^1.2.2" diff --git a/packages/gatsby-plugin-feed/src/gatsby-node.js b/packages/gatsby-plugin-feed/src/gatsby-node.js index 8b2fab7277f1d..54ca050918e1e 100644 --- a/packages/gatsby-plugin-feed/src/gatsby-node.js +++ b/packages/gatsby-plugin-feed/src/gatsby-node.js @@ -59,7 +59,7 @@ exports.onPostBuild = async ({ graphql }, pluginOptions) => { const outputPath = path.join(publicPath, feed.output) const outputDir = path.dirname(outputPath) - if (!(await fs.exists(outputDir))) { + if (!(await fs.pathExists(outputDir))) { await fs.mkdirp(outputDir) } await fs.writeFile(outputPath, rssFeed.xml())