D
Dokploy4mo ago
Mstraa

nixpacks.toml on root directory is not used

Hello I'm struggling a little to try to use nodejs_20 on my project. Setting up the Nixpacks ENV doesn't work because there is some conflict with node 20 and 18 ╔═════════════ Nixpacks v1.29.1 ════════════╗ ║ setup │ nodejs_20, nodejs_18, npm-9_x ║ ║────────────────────────────────────────────║ ║ install │ npm ci ║ ║────────────────────────────────────────────║ ║ build │ npm run build ║ ║────────────────────────────────────────────║ ║ start │ npm run start ║ ╚═══════════════════════════════════╝ When I try to use a nixpacks.toml at the root of my project :
providers = ["node"]

[phases.setup]
nixpkgs = ["nodejs_20", "npm-9_x"]

[phases.install]
cmds = [
"npm ci",
]

[phases.build]
cmds = [
"npm run build",
]

[start]
cmd = "npm run start"
providers = ["node"]

[phases.setup]
nixpkgs = ["nodejs_20", "npm-9_x"]

[phases.install]
cmds = [
"npm ci",
]

[phases.build]
cmds = [
"npm run build",
]

[start]
cmd = "npm run start"
it is not used by dokploy ╔════════ Nixpacks v1.29.1 ═══════╗ ║ setup │ nodejs_18, npm-9_x ║ ║─────────────────────────────────║ ║ install │ npm ci ║ ║─────────────────────────────────║ ║ build │ npm run build ║ ║─────────────────────────────────║ ║ start │ npm run start ║ ╚═══════════════════════════╝ Any idea why ? Thanks in advance 🙂
1 Reply
Mstraa
MstraaOP4mo ago
I manage to it work with nix env variable and removing the nix.toml
NIXPACKS_NODE_VERSION=20
NIXPACKS_NODE_VERSION=20

Did you find this page helpful?