Hello! I am trying to deploy an Elixir application generated by fullstackphoenix.com (with Alpine.JS, Tailwind, and DaisyUI). I am using a stock project generated from there and downloaded directly, then I use flyctl launch
, but I end up getting this error where it cannot find DaisyUI. My hunch is that there is a build step I am missing, like npm install
. Does the default fly.toml not handle such things? Looking through the docs, I didn’t see anything obvious jump out at me, and I’m a bit new to this
This is my fly.toml
:
# fly.toml file generated for os-hb-int on 2022-08-05T17:53:57+01:00
app = "os-hb-int"
kill_signal = "SIGTERM"
kill_timeout = 5
processes = []
[deploy]
release_command = "/app/bin/migrate"
[env]
PHX_HOST = "os-hb-int.fly.dev"
PORT = "8080"
[experimental]
allowed_public_ports = []
auto_rollback = true
[[services]]
http_checks = []
internal_port = 8080
processes = ["app"]
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
force_https = true
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
=> ERROR [builder 13/17] RUN mix assets.deploy 6.1s
------
> [builder 13/17] RUN mix assets.deploy:
#22 1.387
#22 1.387 18:26:28.479 [debug] Downloading tailwind from https://github.com/tailwindlabs/tailwindcss/releases/download/v3.0.18/tailwindcss-linux-x64
#22 6.072 node:internal/modules/cjs/loader:933
#22 6.072 const err = new Error(message);
#22 6.072 ^
#22 6.072
#22 6.072 Error: Cannot find module 'daisyui'
#22 6.072 Require stack:
#22 6.072 - /app/assets/tailwind.config.js
#22 6.072 - /snapshot/tailwindcss/lib/cli.js
#22 6.072 - /snapshot/tailwindcss/standalone-cli/standalone.js
#22 6.072 1) If you want to compile the package/file into executable, please pay attention to compilation warnings and specify a literal in 'require' call. 2) If you don't want to compile the package/file into executable and want to 'require' it from filesystem (likely plugin), specify an absolute path in 'require' call using process.cwd() or process.execPath.
#22 6.072 at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
#22 6.072 at Function._resolveFilename (pkg/prelude/bootstrap.js:1819:46)
#22 6.072 at Function.Module._load (node:internal/modules/cjs/loader:778:27)
#22 6.072 at Module.require (node:internal/modules/cjs/loader:1005:19)
#22 6.072 at Module.require (pkg/prelude/bootstrap.js:1719:31)
#22 6.072 at Module.require (/snapshot/tailwindcss/standalone-cli/standalone.js:21:22)
#22 6.072 at require (node:internal/modules/cjs/helpers:94:18)
#22 6.072 at Object.<anonymous> (/app/assets/tailwind.config.js:9:5)
#22 6.072 at Module._compile (node:internal/modules/cjs/loader:1101:14)
#22 6.072 at Module._compile (pkg/prelude/bootstrap.js:1758:32) {
#22 6.072 code: 'MODULE_NOT_FOUND',
#22 6.072 requireStack: [
#22 6.072 '/app/assets/tailwind.config.js',
#22 6.072 '/snapshot/tailwindcss/lib/cli.js',
#22 6.072 '/snapshot/tailwindcss/standalone-cli/standalone.js'
#22 6.072 ],
#22 6.072 pkg: true
#22 6.072 }
#22 6.094 ** (Mix) `mix tailwind default --minify` exited with 1