tailwind
tailwind copied to clipboard
`mix tailwind default` exists with 137
Command:
mix tailwind default
Output:
** (Mix) mix tailwind default exited with 137
Platform: Mac OS X (13-inch, M1, 2020) Memory 16GB
Mix Tailwind Version:
{:tailwind, "~> 0.1.5", runtime: Mix.env() == :dev}
Mix Config Setup:
config :tailwind,
version: "3.0.10",
default: [
args: ~w(
--config=tailwind.config.js
--input=css/app.css
--output=../priv/static/assets/app.css
),
cd: Path.expand("../assets", __DIR__)
]
Can you try bumping tailwind version to latest? (3.0.24) . I don't have an M1 architecture to test on, so hopefully the latest build will resolve whatever issues you're hitting
This is my new config entry:
config :tailwind,
version: "3.0.24",
default: [
args: ~w(
--config=tailwind.config.js
--input=css/app.css
--output=../priv/static/assets/app.css
),
cd: Path.expand("../assets", __DIR__)
]
Commands I ran:
mix tailwind.install
This is the output from the command:
11:38:52.064 [debug] Downloading tailwind from https://github.com/tailwindlabs/tailwindcss/releases/download/v3.0.24/tailwindcss-macos-arm64
Then I ran:
mix tailwind default
Output:
** (Mix) mix tailwind default exited with 137
Are there any artifacts that I need to delete to ensure tailwind updates properly?
You could try invoking the standalone tailwinds cli directly from your _build
dir and seeing if it provides more helpful output:
$ cd assets
$ ../_build/ailwindcss-macos-arm64 --config=tailwind.config.js --input=css/app.css --output=../priv/static/assets/app.css
I ran:
cd assets
Then:
../_build/tailwind-macos-arm64 --config=tailwind.config.js --input=css/app.css --output=../priv/static/assets/app.css
This was the output:
[1] 47934 killed ../_build/tailwind-macos-arm64 --config=tailwind.config.js --input=css/app.css
I can fork and maybe take a look since you don't have an M1
@JosephShering same over here on my M1
I managed to fix the problem temporarily by downloading the latest tailwindcss CLI (as described here) and then replacing the (seemingly corrupted) cli Version at ../_build/tailwind-macos-arm64
with the downloaded version
In my case, dropping the _build
folder and running mix tailwind.install
again helps
@chrismccord I have found out what is causing this problem: Mac OS seems to be killing the binary after you update the version. This has to do with the signature of binary I think.
Simply deleting the binary inside _build
and running mix tailwind.install
resolves the problem. I think we should update the install script to first delete the file and then write a new file instead overwriting the current file: https://github.com/phoenixframework/tailwind/blob/b1d487608bc0486995772232c72961042ba15676/lib/tailwind.ex#L220
I can open a PR for this if you agree.
@JosephShering It looks like a typo in your issue title. It reads "exists" instead of "exited". can rename the title of this issue to "mix tailwind default exited with 137".
@chrismccord I have found out what is causing this problem: Mac OS seems to be killing the binary after you update the version. This has to do with the signature of binary I think.
Simply deleting the binary inside
_build
and runningmix tailwind.install
resolves the problem. I think we should update the install script to first delete the file and then write a new file instead overwriting the current file: https://github.com/phoenixframework/tailwind/blob/b1d487608bc0486995772232c72961042ba15676/lib/tailwind.ex#L220I can open a PR for this if you agree.
@chrismccord shall I submit a PR or is there some other (better) solution?
Just wanted to confirm that deleting _build/tailwind-macos-arm64
and running tailwind.install
fixed it.
I was able to reproduce the problem by changing the config :tailwind, version: "..."
version number and running tailwind.install
again (as dvic said). After a second install of a different version mix tailwind default
always exits with 137.