The engine "node" is incompatible with this module

Hi, My project is failing with this reason: The engine "node" is incompatible with this module. Expected version "18.12". Got "18.17.1" I've set NIXPACKS_NODE_VERSION=18.12 and this is how my package.json looks like:
{
...
"engines": {
"node": "18.12"
},
...
}
{
...
"engines": {
"node": "18.12"
},
...
}
6 Replies
Percy
Percy9mo ago
Project ID: 56ecf4a7-da41-4ba0-a70c-7708dac4054f
Henrique Antonio
56ecf4a7-da41-4ba0-a70c-7708dac4054f
Brody
Brody9mo ago
nixpacks only supports specifying major versions like that, then will use whatever minor and patch versions it has in the set nix's archive, in this case its 18.17.1 to use a specific version you need to specify the nix archive that has node 18.12.0 as the version for node 18, like so add this to a nixpacks.toml file in your project (untested)
[phases.setup]
nixpkgsArchive = '1cdd36c0d2e09a6031c639d597197ffdd4a64618'
[phases.setup]
nixpkgsArchive = '1cdd36c0d2e09a6031c639d597197ffdd4a64618'
context: https://github.com/NixOS/nixpkgs/commit/1cdd36c0d2e09a6031c639d597197ffdd4a64618
Henrique Antonio
Context: Build after the addition of nixpacks.toml
Brody
Brody9mo ago
try this archive version instead, this is 18.12.1 3c3b3ab88a34ff8026fc69cb78febb9ec9aedb16