question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

manage.py tailwind build exits with success even if command failed

See original GitHub issue

In my Dockerfile I have this step: RUN ./manage.py tailwind build (followed by ./manage.py collectstatic). The build completed successfully, but the image was broken, because it didn’t contain the static/css/dist directory.

It took a while to figure out; ideally, if manage.py tailwind build fails, it should exit with an error, so that the whole image building fails.

The error was apparent from inside the Docker container; should have run manage.py tailwind install first:

$ ./manage.py tailwind build && echo ok

> theme@3.1.1 build
> npm run build:clean && npm run build:tailwind


> theme@3.1.1 build:clean
> rimraf ../static/css/dist

sh: 1: rimraf: not found
ok

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
timonwebcommented, Jun 19, 2022

Indeed, added returncode 1 in 3.3.0. Thanks for reporting.

0reactions
mgaxcommented, Sep 14, 2022

@2qxtx I’m also on django-tailwind 3.4.0 and rimraf got installed alright. This is in a Docker image, so the node_modules is not left over from a previous version. Hope this helps:

wagtail@1f3f5a0f1cda:/app/theme/static_src$ ls -l node_modules/.bin/rimraf 
lrwxrwxrwx 1 wagtail wagtail 16 Sep 14 10:49 node_modules/.bin/rimraf -> ../rimraf/bin.js
wagtail@1f3f5a0f1cda:/app/theme/static_src$ pip freeze | grep tailwind
django-tailwind==3.4.0
wagtail@1f3f5a0f1cda:/app/theme/static_src$ grep rimraf package*
package-lock.json:        "rimraf": "^3.0.2",
package-lock.json:    "node_modules/rimraf": {
package-lock.json:      "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
package-lock.json:        "rimraf": "bin.js"
package-lock.json:    "rimraf": {
package-lock.json:      "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
package.json:    "build:clean": "rimraf ../static/css/dist",
package.json:    "rimraf": "^3.0.2",
Read more comments on GitHub >

github_iconTop Results From Across the Web

error executing "manage.py tailwind start" · Issue #8 - GitHub
Hi all, this is clearly a problem with Windows, I don't have Windows so I can't check. If anyone using Windows has solved...
Read more >
Can't Start Django-Tailwind in Dev Mode - Stack Overflow
One thing I noticed is that the command that it is failing on uses watch , which is not a Windows command. However,...
Read more >
Installing Tailwind CSS v2 with Django-Tailwind | TimOnWeb
Django-Tailwind has a python manage.py tailwind init <my_theme_name> command that generates a separate Django app for you.
Read more >
Installation — Django-Tailwind 2.0.0 documentation
Step-by-step instructions . Install the django-tailwind package via pip : python -m pip ...
Read more >
[Support Guide] Frequently encountered problems during builds
1. First steps - ruling out the obvious · 1.5 Build logs · 2. Command not found - we need to know what...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found