I tried to run grant to rebuild amd but instate I ruined everything, all min.js and min.js.map are totally wrong and not working, how could I uninstall all node.js and grunt and re-install a versions that is compatible with moodle 4.2 to run grunt again to rebuilt these files with steps please because I didn't do that before.
I got this error:
PS D:\server\htdocs\moodle> npm audit fix
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: Moodle@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/grunt
npm ERR! dev grunt@"^1.6.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer grunt@"0.4.x" from [email protected]
npm ERR! node_modules/grunt-jsdoc
npm ERR! dev grunt-jsdoc@"^0.4.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\Pharouk-lenovo\AppData\Local\npm-cache\eresolve-report.txt for a full report.
[email protected]has a peer dependencygruntand demands its version is0.4.x. But in your project, the installedgruntpackage's version is1.6.1which is incompatible. The warning will display when using npm v7.The safe solution is to fix the version compatibility issue. You can use the latest version of
grunt-jsdoc(2.4.1until 2023.7.4)The warning will be gone.
Further reading legacy-peer-deps