Trying to deploy Strapi project it fails. It's the same build that works 4 days ago.

Hi I'm trying to deploy a strapi project but it fails. I try to redeploy the same project that builds correctly 4 days ago. But also fails so I think there's something wrong on the CI Here's the build log. Hope it helps
#10 17.66 gyp ERR! find Python
#10 17.66 gyp ERR! find Python Python is not set from command line or npm configuration
#10 17.66 gyp ERR! find Python Python is not set from environment variable PYTHON
#10 17.66 gyp ERR! find Python checking if "python3" can be used
#10 17.66 gyp ERR! find Python - "python3" is not in PATH or produced an error
#10 17.66 gyp ERR! find Python checking if "python" can be used
#10 17.66 gyp ERR! find Python - "python" is not in PATH or produced an error
....
Dockerfile:20
-------------------
18 | ENV NIXPACKS_PATH /app/node_modules/.bin:$NIXPACKS_PATH
19 | COPY . /app/.
20 | >>> RUN --mount=type=cache,id=s/6eac7725-1303-464a-a12e-c54b827c5d96-/usr/local/share/cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6 yarn install --frozen-lockfile
21 |
22 | # build phase
-------------------
ERROR: failed to solve: process "/bin/bash -ol pipefail -c yarn install --frozen-lockfile" did not complete successfully: exit code: 1

Error: Docker build failed
#10 17.66 gyp ERR! find Python
#10 17.66 gyp ERR! find Python Python is not set from command line or npm configuration
#10 17.66 gyp ERR! find Python Python is not set from environment variable PYTHON
#10 17.66 gyp ERR! find Python checking if "python3" can be used
#10 17.66 gyp ERR! find Python - "python3" is not in PATH or produced an error
#10 17.66 gyp ERR! find Python checking if "python" can be used
#10 17.66 gyp ERR! find Python - "python" is not in PATH or produced an error
....
Dockerfile:20
-------------------
18 | ENV NIXPACKS_PATH /app/node_modules/.bin:$NIXPACKS_PATH
19 | COPY . /app/.
20 | >>> RUN --mount=type=cache,id=s/6eac7725-1303-464a-a12e-c54b827c5d96-/usr/local/share/cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6 yarn install --frozen-lockfile
21 |
22 | # build phase
-------------------
ERROR: failed to solve: process "/bin/bash -ol pipefail -c yarn install --frozen-lockfile" did not complete successfully: exit code: 1

Error: Docker build failed
Thanks
29 Replies
Percy
Percy2y ago
Project ID: 6eac7725-1303-464a-a12e-c54b827c5d96
Oscar Bustos
Oscar BustosOP2y ago
I have my project waiting please, need some help on this
Brody
Brody2y ago
send me your railway.json file, if you don't have a physical file in your project send me the auto generated one that can be found in the details tab of your latest deployment (even a failed deployment has one)
Oscar Bustos
Oscar BustosOP2y ago
I didn't found the autogenerated json here i found the deployment id
0eacc7ba-19fb-4ad5-8a70-c5d04f8a447e
0eacc7ba-19fb-4ad5-8a70-c5d04f8a447e
On three dots options I only have redeploy or remove
Brody
Brody2y ago
I need the railway.json file I'm just a community member, I can't do anything with the id's
Oscar Bustos
Oscar BustosOP2y ago
I didn't find railway.json file in my failure deploy options
Brody
Brody2y ago
okay let me know when you find it
Oscar Bustos
Oscar BustosOP2y ago
4 days ago the same build works fine and now I have errors on the building step
#10 18.25 gyp ERR! find Python
#10 18.25 gyp ERR! find Python Python is not set from command line or npm configuration
#10 18.25 gyp ERR! find Python Python is not set from environment variable PYTHON

#10 18.25 gyp ERR! find Python checking if "python3" can be used
#10 18.25 gyp ERR! find Python - "python3" is not in PATH or produced an error
#10 18.25 gyp ERR! find Python checking if "python" can be used
#10 18.25 gyp ERR! find Python - "python" is not in PATH or produced an error
#10 18.25 gyp ERR! find Python
#10 18.25 gyp ERR! find Python
#10 18.25 gyp ERR! find Python Python is not set from command line or npm configuration
#10 18.25 gyp ERR! find Python Python is not set from environment variable PYTHON

#10 18.25 gyp ERR! find Python checking if "python3" can be used
#10 18.25 gyp ERR! find Python - "python3" is not in PATH or produced an error
#10 18.25 gyp ERR! find Python checking if "python" can be used
#10 18.25 gyp ERR! find Python - "python" is not in PATH or produced an error
#10 18.25 gyp ERR! find Python
Brody
Brody2y ago
^
Oscar Bustos
Oscar BustosOP2y ago
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"buildCommand": "yarn develop"
},
"deploy": {
"numReplicas": 1,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"buildCommand": "yarn develop"
},
"deploy": {
"numReplicas": 1,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
Brody
Brody2y ago
send your package.json please
Oscar Bustos
Oscar BustosOP2y ago
{
"name": "strapi",
"private": true,
"version": "0.1.0",
"description": "A Strapi application",
"scripts": {
"develop": "strapi develop",
"start": "strapi start",
"build": "strapi build",
"strapi": "strapi"
},
"devDependencies": {},
"dependencies": {
"@strapi/plugin-i18n": "4.5.5",
"@strapi/plugin-users-permissions": "4.5.5",
"@strapi/provider-upload-cloudinary": "4.5.5",
"@strapi/strapi": "4.5.5",
"better-sqlite3": "7.4.6",
"pg": "^8.8.0",
"pg-connection-string": "^2.5.0"
},
"author": {
"name": "A Strapi developer"
},
"strapi": {
"uuid": "35d7a084-3088-4d0b-869e-f503693ee8e5"
},
"engines": {
"node": ">=16.x.x",
"npm": ">=6.0.0"
},
"license": "MIT"
}
{
"name": "strapi",
"private": true,
"version": "0.1.0",
"description": "A Strapi application",
"scripts": {
"develop": "strapi develop",
"start": "strapi start",
"build": "strapi build",
"strapi": "strapi"
},
"devDependencies": {},
"dependencies": {
"@strapi/plugin-i18n": "4.5.5",
"@strapi/plugin-users-permissions": "4.5.5",
"@strapi/provider-upload-cloudinary": "4.5.5",
"@strapi/strapi": "4.5.5",
"better-sqlite3": "7.4.6",
"pg": "^8.8.0",
"pg-connection-string": "^2.5.0"
},
"author": {
"name": "A Strapi developer"
},
"strapi": {
"uuid": "35d7a084-3088-4d0b-869e-f503693ee8e5"
},
"engines": {
"node": ">=16.x.x",
"npm": ">=6.0.0"
},
"license": "MIT"
}
Brody
Brody2y ago
any reason you are starting strapi in development mode? development mode is meant to only be ran locally
Oscar Bustos
Oscar BustosOP2y ago
I try develop and regular script both fail
Brody
Brody2y ago
do you have a repo for this
Oscar Bustos
Oscar BustosOP2y ago
Yes But it’s private
Brody
Brody2y ago
add me? there shouldnt be anything private afaik
Oscar Bustos
Oscar BustosOP2y ago
I create the project from railway Strapi template
Brody
Brody2y ago
i just dont understand why python is required all of a sudden
Oscar Bustos
Oscar BustosOP2y ago
GitHub
GitHub - railwayapp-templates/strapi: Deploy Strapi on Railway. Nex...
Deploy Strapi on Railway. Next-gen headless CMS. Contribute to railwayapp-templates/strapi development by creating an account on GitHub.
Brody
Brody2y ago
but hey, if it wants python, lets give it python lol
Oscar Bustos
Oscar BustosOP2y ago
Me neither
Brody
Brody2y ago
i will give it python, hold please
Oscar Bustos
Oscar BustosOP2y ago
Is there an option to open a ticket?
Brody
Brody2y ago
hold please use this railway.json file (put it in your project folder) and this will tell railway you want python too
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"nixpacksPlan": {
"phases": {
"setup": {
"nixPkgs": ["...", "python38"]
}
}
}
},
"deploy": {
"numReplicas": 1,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"nixpacksPlan": {
"phases": {
"setup": {
"nixPkgs": ["...", "python38"]
}
}
}
},
"deploy": {
"numReplicas": 1,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
Oscar Bustos
Oscar BustosOP2y ago
Ok thanks I’ll try it later deploying .... lets see if it works Looks like sqlite package was the problem, not sure why. I need this package to work in local without production database
Brody
Brody2y ago
yeah I figured that's why you had sqlite, maybe try moving sqlite to the dev dependencies? and always regen your lock file!
Oscar Bustos
Oscar BustosOP2y ago
any idea how I can regen lock file always when I deploy ¿
Brody
Brody2y ago
run npm i --package-lock-only locally
Want results from more Discord servers?
Add your server