Fix build compatibility issues

🔧 Build Fixes:
- Downgrade TypeScript from ^5.7.3 to ^4.9.5 for react-scripts compatibility
- Add .npmrc with legacy-peer-deps=true to handle dependency conflicts
- Ensure compatibility with react-scripts@5.0.1 requirements

This resolves the ERESOLVE error:
 react-scripts@5.0.1 expects typescript ^3.2.1 || ^4
 Now using typescript ^4.9.5 (compatible)

Build should now succeed on Vercel.
This commit is contained in:
Randall Stillwell 2025-07-22 10:32:15 -05:00
parent 2c1e9bbb79
commit 0bc3e854fb
3 changed files with 10 additions and 8 deletions

2
.npmrc Normal file
View file

@ -0,0 +1,2 @@
legacy-peer-deps=true
fund=false

12
package-lock.json generated
View file

@ -35,13 +35,13 @@
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"react-router-dom": "^6.28.0", "react-router-dom": "^6.28.0",
"react-scripts": "5.0.1", "react-scripts": "5.0.1",
"typescript": "^5.7.3",
"web-vitals": "^2.1.4" "web-vitals": "^2.1.4"
}, },
"devDependencies": { "devDependencies": {
"autoprefixer": "^10.4.21", "autoprefixer": "^10.4.21",
"postcss": "^8.5.6", "postcss": "^8.5.6",
"tailwindcss": "^3.4.17" "tailwindcss": "^3.4.17",
"typescript": "^4.9.5"
}, },
"engines": { "engines": {
"node": "22.x" "node": "22.x"
@ -20697,16 +20697,16 @@
} }
}, },
"node_modules/typescript": { "node_modules/typescript": {
"version": "5.8.3", "version": "4.9.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
"license": "Apache-2.0", "license": "Apache-2.0",
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
"tsserver": "bin/tsserver" "tsserver": "bin/tsserver"
}, },
"engines": { "engines": {
"node": ">=14.17" "node": ">=4.2.0"
} }
}, },
"node_modules/unbox-primitive": { "node_modules/unbox-primitive": {

View file

@ -33,7 +33,6 @@
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"react-router-dom": "^6.28.0", "react-router-dom": "^6.28.0",
"react-scripts": "5.0.1", "react-scripts": "5.0.1",
"typescript": "^5.7.3",
"web-vitals": "^2.1.4" "web-vitals": "^2.1.4"
}, },
"scripts": { "scripts": {
@ -63,6 +62,7 @@
"devDependencies": { "devDependencies": {
"autoprefixer": "^10.4.21", "autoprefixer": "^10.4.21",
"postcss": "^8.5.6", "postcss": "^8.5.6",
"tailwindcss": "^3.4.17" "tailwindcss": "^3.4.17",
"typescript": "^4.9.5"
} }
} }