I'm stumbling on an error every time I run npm run build
error:
/node_modules/mini-css-extract-plugin/node_modules/schema-utils/dist/validate.js:66
const ajv = new Ajv({
^
TypeError: Ajv is not a constructor
at Object.<anonymous> (/home/ts34mpr/website/client/node_modules/mini-css-extract-plugin/node_modules/schema-utils/dist/validate.js:66:13)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/ts34mpr/website/client/node_modules/mini-css-extract-plugin/node_modules/schema-utils/dist/index.js:6:5)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
please does anyone knows the solution or can help please! Thank you
Node.js+npm
(before I was updatingCRA
and weback to version 5) but it was broken by the Node.js version update. – LeptospirosisWe decided to move from npm to yarn
due to many issues recently withnpm
- also since this error wasunfixable
in 1MD and we needed to release new production asap. How to move from npm to yarn I described here: https://mcmap.net/q/435084/-how-do-i-switch-from-npm-to-yarn-in-my-project – Leptospirosis