Dajngo/Tailwind deployment Error: No start command could be found
Project id - 5b1ca7b8-37a6-491d-a6e1-2ca3e0236431
Hi, can someone help me with this error I am getting on build. Its a Django project which is dependant on Tailwind (via Django-Tailwind), I understand it needs Node to function but my pre-deployment research led me to believe that Django-Tailwind would compile the package.json and Nix would automatically install Node and any dependencies on Build (oh so easy right 🙂 ). Obviously this isn't the case.
What should I be looking to put into my package.json, which I assume needs a script/command ? I'm a Python/Django person so this is a mystery to me.
Any help much appreciated.
85 Replies
Project ID:
5b1ca7b8-37a6-491d-a6e1-2ca3e0236431
please share your repo
what is the services root directory set to?
Doh, / ---- should be /mysite I take it? let me try
yes but you are also using a Dockerfile, thus nixpacks is not involved at all, it would be up to you to write the dockerfile that builds your app properly
I'm not using Docker, I assumed would be ignored
Yea it's created automatically by Wagtail
and it would be used by railway
Ah right Ok, i'll remove it from repo
so to build this app of yours, you would need node and what node/npm commands do you need to run?
Django-Tailwind is reliant on Node in dev i do
python manage.py taliwind start
to build the css i do python manage.py tailwind build
. From their docs ..."This will replace the development build with a bundle optimized for production. No further actions are necessary; you can deploy"you would need to write a nixpacks.toml file to add node to your build, and to add extra phases that will run those commands you just spoke of.
https://nixpacks.com/docs/guides/configuring-builds
Ok thanks for pointing me in the right direction, the file would live in the root directory of the app?