10 months ago
I have a Django project that is using Django Tailwind.
In my railway.json I have this line:
"startCommand": "python3 manage.py tailwind build && python3 manage.py migrate && python3 manage.py collectstatic --noinput && gunicorn poll.wsgi"
I have Python and NodeJS set as Language providers.
tailwind build is the part that causes the below error.
ERROR FROM LOG:
container event container died
npm WARN config production Use --omit=dev
instead.
theme@3.8.0 build:tailwind
cross-env NODE_ENV=production tailwindcss --postcss -i ./src/styles.css -o ../static/css/dist/styles.css --minify
node:events:496
throw er; // Unhandled 'error' event
^
Error: spawn tailwindcss ENOENT
at ChildProcess.handle.onexit (node:internal/childprocess:286:19)
at onErrorNT (node:internal/childprocess:484:16) at process.processTicksAndRejections (node:internal/process/taskqueues:82:21)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess.handle.onexit (node:internal/childprocess:292:12)
at onErrorNT (node:internal/childprocess:484:16) at process.processTicksAndRejections (node:internal/process/taskqueues:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn tailwindcss',
path: 'tailwindcss',
spawnargs: [
'--postcss',
'-i',
'./src/styles.css',
'-o',
'../static/css/dist/styles.css',
'--minify'
]
}
ⓘ Deployment information is only viewable by project members and Railway employees.
3 Replies
9 months ago
python3 manage.py tailwind build
is used to build the CSS with django-tailwinds.
Running locally is fine so not sure what I'm missing to make it crash