BIRSAx2

BIRSAx2

Phoenix won't compile Tailwindcss

Hello,
I’m following this tutorial to setup tailwindcss with Phoenix. However when I run mix phx.server I keep getting this strange error:

[error] Task #PID<0.543.0> started from PetalSkeletonWeb.Endpoint terminating
** (stop) :eacces
    erlang.erl:4412: :erlang.open_port({:spawn_executable, 'c:/Program Files/nodejs/npx.cmd'}, [{:cd, "d:/Code/Elixir/petal_skeleton/assets"}, :stderr_to_stdout, :use_stdio, :exit_status, :binary, :hide, {:args, ["tailwindcss", "--input=css/app.css", "--output=../priv/static/assets/app.css", "--postcss", "--watch"]}])
    (elixir 1.12.3) lib/system.ex:1052: System.do_cmd/3
    (phoenix 1.6.2) lib/phoenix/endpoint/watcher.ex:36: Phoenix.Endpoint.Watcher.watch/2
    (elixir 1.12.3) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2
    (stdlib 3.15) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Function: &Phoenix.Endpoint.Watcher.watch/2
    Args: ["npx", ["tailwindcss", "--input=css/app.css", "--output=../priv/static/assets/app.css", "--postcss", "--watch", {:cd, "d:/Code/Elixir/petal_skeleton/assets"}]]
[error] Task #PID<0.545.0> started from PetalSkeletonWeb.Endpoint terminating

Full log here ```mix phx.server log
I’ve trying to reinstall Elixir and node multiple times but nothing worked.

This other files might be helpful
dev.exs
mix.exs
package.json
postcss.config.js
tailwind.config.js
app.css

Marked As Solved

BIRSAx2

BIRSAx2

I don’t know exactly why but by renaming C:\Program Files\nodejs\npm.cmd to C:\Program Files\nodejs\npm.bat and C:\Program Files\nodejs\npx.cmd to C:\Program Files\nodejs\npx.bat the problem is solved.
I guess it’s some weird node permissions issue on windows.

Also Liked

Sebb

Sebb

If you are not forced to use windows on your dev-machine you should consider giving Linux or at least Mac a try.

Where Next?

Popular in Questions Top

gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New

Other popular topics Top

Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30877 112
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36128 110
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New

We're in Beta

About us Mission Statement