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
Percy
Percy9mo ago
Project ID: 5b1ca7b8-37a6-491d-a6e1-2ca3e0236431
Brody
Brody9mo ago
please share your repo
TheJoker
TheJoker9mo ago
GitHub
GitHub - rob8624/Blog
Contribute to rob8624/Blog development by creating an account on GitHub.
Brody
Brody9mo ago
what is the services root directory set to?
TheJoker
TheJoker9mo ago
Doh, / ---- should be /mysite I take it? let me try
Brody
Brody9mo ago
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
TheJoker
TheJoker9mo ago
I'm not using Docker, I assumed would be ignored
TheJoker
TheJoker9mo ago
Yea it's created automatically by Wagtail
Brody
Brody9mo ago
and it would be used by railway
TheJoker
TheJoker9mo ago
Ah right Ok, i'll remove it from repo
Brody
Brody9mo ago
so to build this app of yours, you would need node and what node/npm commands do you need to run?
TheJoker
TheJoker9mo ago
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"
Brody
Brody9mo ago
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
TheJoker
TheJoker9mo ago
Ok thanks for pointing me in the right direction, the file would live in the root directory of the app?
Want results from more Discord servers?
Add your server