find-cache-dir was updated, so that it can now only be used with ES modules. Longterm it makes sense to update the whole react-kickstarter package to ES modules.
After updating to ES modules we can upgrade find-cache-dir to the newest version. Also we can remove pkg-dir from the dependencies as this package is only listed in the dependencies to pin it to the last version that do not require ES modules.
Here's how we can update to ES modules:
https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
Hint: On the first attempt of upgrading to ES modules it was hard to replace conditional require() calls. We might be able to replace these require() calls by import() calls, but this would make the code async.
find-cache-dirwas updated, so that it can now only be used with ES modules. Longterm it makes sense to update the wholereact-kickstarterpackage to ES modules.After updating to ES modules we can upgrade
find-cache-dirto the newest version. Also we can removepkg-dirfrom the dependencies as this package is only listed in the dependencies to pin it to the last version that do not require ES modules.Here's how we can update to ES modules:
https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
Hint: On the first attempt of upgrading to ES modules it was hard to replace conditional
require()calls. We might be able to replace theserequire()calls byimport()calls, but this would make the code async.