Closed OliverGeneser closed 3 years ago
It seems like on windows NODE_ENV=production
doesn't work. I see that using something like cross-env would be the solution for all users, but until I implement that, you can do a manual fix, here's how:
theme/static_src/package.json
file"build:postcss": "NODE_ENV=production postcss --config . --map false --output ../static/css/styles.css ../static/css/styles.css",
"build:postcss": "SET NODE_ENV=production && postcss --config . --map false --output ../static/css/styles.css ../static/css/styles.css",
I don't have Windows, so this is untested, but should work. Please try it and let me know here if it has solved the issue.
Hey, I just went ahead and added cross-env
so you have two options: either complete steps outlined above, or upgrade to the latest django-tailwind v1.1.1
and init a tailwind project once again.
Thanks a lot! I went ahead abd update django-tailwind and it now works perfectly!
Great, thanks for the confirmation!
Hey guys!
When I run the command 'Python manage.py tailwind build' I get the following error:
'NODE_ENV' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! django_tailwind@ build:postcss:
NODE_ENV=production postcss --config . --map false --output ../static/css/styles.css ../static/css/styles.css
npm ERR! Exit status 1 npm ERR!Running the 'tailwind start' command works fine.
I have already set my NPM_BIN_PATH in settings.