react-clear-cache icon indicating copy to clipboard operation
react-clear-cache copied to clipboard

Error thrown with mkdirp

Open kellykampen opened this issue 5 years ago • 2 comments

Since a few versions back I am now getting this error when I attempt to run the prebuild cli.

> ./node_modules/react-clear-cache/bin/cli.js

./node_modules/mkdirp/lib/opts-arg.js:13
    throw new TypeError('invalid options argument')
    ^

TypeError: invalid options argument
    at optsArg (/.../node_modules/mkdirp/lib/opts-arg.js:13:11)
    at mkdirp (/.../node_modules/mkdirp/index.js:11:10)
    at writeFile (/.../node_modules/react-clear-cache/bin/cli.js:37:3)
    at Object.<anonymous> (/.../node_modules/react-clear-cache/bin/cli.js:23:1)

Any ideas on how to get around this?

Thanks in advance .

kellykampen avatar Dec 15 '20 07:12 kellykampen

@kellykampen , can you try to delete your node_modules and package-lock.json and re-install.

nucab avatar Dec 15 '20 14:12 nucab

@noahjohn9259 Tried that a few times, and again just now to be certain. Still have the same issue. It seems that some of the packages I use have upgraded to mkdirp 1.0 instead of the older 0.5. In your react-clear-cache no mkdirp version is set. I think this may potentially be the culprit, as it's trying to use the newer version which now works on promises only.

kellykampen avatar Dec 16 '20 04:12 kellykampen