try deploy fix
This commit is contained in:
@ -120,6 +120,27 @@ if [ "$UPDATE_CODE_FROM_GIT" = "true" ]; then
|
||||
echo "Installing bcrypt package separately with build from source..." | tee -a /app/logs/deploy.txt
|
||||
npm install bcrypt@latest --build-from-source --no-save --no-audit --no-fund || echo "Failed to install bcrypt, continuing anyway"
|
||||
|
||||
# Fix Prisma-specific issues
|
||||
echo "Fixing Prisma-specific dependencies..." | tee -a /app/logs/deploy.txt
|
||||
|
||||
# Remove problematic Prisma nested dependencies
|
||||
if [ -d "node_modules/@prisma" ]; then
|
||||
echo "Cleaning up Prisma dependencies..." | tee -a /app/logs/deploy.txt
|
||||
rm -rf node_modules/@prisma/internals/node_modules/@prisma/engines
|
||||
rm -rf node_modules/@prisma/internals/node_modules/@prisma/engines-version
|
||||
rm -rf node_modules/@prisma/client/node_modules/@prisma/engines-version
|
||||
rm -rf node_modules/.prisma
|
||||
fi
|
||||
|
||||
# Install specific Prisma versions known to work
|
||||
echo "Installing specific Prisma versions..." | tee -a /app/logs/deploy.txt
|
||||
npm uninstall prisma @prisma/client --no-save || true
|
||||
npm install prisma@5.12.0 @prisma/client@5.12.0 --save-exact --no-audit --no-fund || echo "Failed to install Prisma, continuing anyway"
|
||||
|
||||
# Ensure Prisma engines are downloaded
|
||||
echo "Generating Prisma client..." | tee -a /app/logs/deploy.txt
|
||||
npx prisma generate --schema=./prisma/schema.prisma || echo "Failed to generate Prisma client, continuing anyway"
|
||||
|
||||
echo "\r\n\r\n Checking for changes in package files..."
|
||||
# Determine if package.json or package-lock.json has changed
|
||||
PACKAGE_CHANGE=0
|
||||
|
Reference in New Issue
Block a user