Created
August 30, 2022 19:23
-
-
Save kroeder/e4ac67f73d7fc03c8355c168518824ce to your computer and use it in GitHub Desktop.
Workaround for fs-extra mkdir in node 16 (https://github.com/storybookjs/storybook/issues/16732#issuecomment-1232053451)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/node_modules/fs-extra/lib/copy/copy.js b/node_modules/fs-extra/lib/copy/copy.js | |
index 328f102..31cd27b 100644 | |
--- a/node_modules/fs-extra/lib/copy/copy.js | |
+++ b/node_modules/fs-extra/lib/copy/copy.js | |
@@ -150,7 +150,7 @@ function onDir (srcStat, destStat, src, dest, opts, cb) { | |
} | |
function mkDirAndCopy (srcMode, src, dest, opts, cb) { | |
- fs.mkdir(dest, err => { | |
+ fs.mkdir(dest, { recursive: true }, err => { | |
if (err) return cb(err) | |
copyDir(src, dest, opts, err => { | |
if (err) return cb(err) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment