I've been sent here by the *** AI who has told me to post the following after some 3 hours of failing to fix it. The issue is a module resolution mismatch occurring during the build process of your CRACO setup. Problem Description:
Issue: Deployment is failing with Command "npm run build" exited with 1.Primary Error: A requireStack error during build, indicating an issue loading modules related to @craco/craco and Webpack dependencies (ajv-keywords, schema-utils, terser-webpack-plugin).Context: Project created using Emergent, with the frontend located in a subdirectory of a GitHub repository.Configuration Changes Already Made:
Root Directory: Set to frontendBuild Command: Set to npm run buildInstall Command: Set to npm install --legacy-peer-deps --forceNode.js Version: Set to 20.x (updated from 24.x)Error Logs:
'/vercel/path0/frontend/node_modules/ajv-keywords/dist/keywords/index.js', '/vercel/path0/frontend/node_modules/ajv-keywords/dist/index.js', '/vercel/path0/frontend/node_modules/schema-utils/dist/validate.js', '/vercel/path0/frontend/node_modules/schema-utils/dist/index.js', '/vercel/path0/frontend/node_modules/terser-webpack-plugin/dist/index.js', '/vercel/path0/frontend/node_modules/react-scripts/config/webpack.config.js', '/vercel/path0/frontend/node_modules/@craco/craco/dist/lib/cra.js', '/vercel/path0/frontend/node_modules/@craco/craco/dist/scripts/build.js' Node.js v20.20.2 Error: Command "npm run build" exited with 1