'getting ' ajv is not a constructor mini-css-extract-plugin ' error whenever installing package using npm

whenever I'm trying to install a package from npm I'm getting the following error : ajv is not a constructor , mini-css-extract-plugin My project is now stopped due to this error I can't download any new package. This only works if I deleted node_modules and reinstalled it but the same happens again if I download a new package! Thanks for helping



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source