Minimatch issue
Minimatch
is a package that is used by Strapi and has a known issues. This can
cause problems when trying to build or run your Strapi project. Sometimes it
happens that a project locally works, but fails in production or in a different
environment.
What’s the solution?
Section titled “What’s the solution?”To resolve this issue, you can update the minimatch
. If minimatch is in the
package.json
from a Strapi package, remove minimatch and reinstall (the Strapi
package). Go to the root of your Strapi project and run the following command:
yarn add -D @types/minimatch": "3.0.5"
Make sure you also add this Resolution to your package.json
:
"resolutions": { "minimatch": "^3.0.0", "@types/minimatch": "^3.0.0"}
If this still fails the project, make sure to add the same in the package.json
in the CMS folder. Also check if there are no ’^’ in release numbers in the
package.json files.
If still not working, you can try to remove the node_modules
folder.
If you need an example of a project where the issue was resolved, you can check:
- Kentekenloket
- MCG