#Error: Command "./build_files.sh" exited with 2 while deploying on vercel

9 messages · Page 1 of 1 (latest)

vocal gyro
#

did you have a question?

honest path
#

I am getting above error while deploying project on vercel.

honest path
#

@vocal gyro This is my vercel.json file

{
  "version": 2,
  "builds": [
    {
      "src": "ecom/wsgi.py",
      "use": "@vercel/python",
      "config": { "maxLambdaSize": "15mb", "runtime": "python3.9" }
    },
    {
      "src": "build_files.sh",
      "use": "@vercel/static-build",
      "config": {
        "distDir": "staticfiles"
      }
    }
  ],
  "routes": [
    {
      "src": "/static/(.*)",
      "dest": "/static/$1"
    },
    {
      "src": "/(.*)",
      "dest": "ecom/wsgi.py"
    }
  ]
}
#

@vocal gyro This is my build_files.sh

PROJECT_DIR=$(pwd)
APP_DIR="$PROJECT_DIR/ecom"
pip install -r "$PROJECT_DIR/requirements.txt"
python3.9 "$APP_DIR/manage.py" collectstatic 
vocal gyro
#

sorry I don't even know what "Vercel" is

honest path
#

The vercel.json configuration file lets you configure, and override the default behavior of Vercel from within your project.

#

@vocal gyro Any other platform where I can delpoy django project without facing any obstacles.

#

@outer shuttle help me in this problem!