Skip to content

Commit

Permalink
fix: workaround misleading ENOENT error (#11160)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung authored Feb 21, 2020
1 parent 223cee7 commit a583eab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/babel-register/src/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ export function save() {
fs.writeFileSync(FILENAME, serialised);
} catch (e) {
switch (e.code) {
// workaround https://github.com/nodejs/node/issues/31481
// todo: remove the ENOENT error check when we drop node.js 13 support
case "ENOENT":
case "EACCES":
case "EPERM":
console.warn(
Expand Down

0 comments on commit a583eab

Please sign in to comment.