Why nixpacks.toml is ignored?

ahmetso
FREE

20 days ago

I want to omit installing dev dependencies in prod build. Have the following nixpacks.toml in the root directory of the project. In the build logs, I can see that it runs npm ci instead of npm ci --omit=dev. Why could that be? I also can't see a line about nixpacks.toml looked, for used, or ignored because it's invalid. Any guesses or directions? Thanks!

[variables]
NODE_ENV = "production"

[phases.install]
cmd = "npm ci --omit=dev"

[phases.build]
cmd = "npm run build"

[start]
cmd = "npm start"
$10 Bounty

0 Replies

ahmetso
FREE

20 days ago

f751db28-1dff-4485-9579-a7141e0c9a35


ahmetso
FREE

20 days ago

I am suspecting my nixpacks.toml is not complete. What else should I add?
Feedback: Regardless, a log line saying nixpacks.toml is not found or not valid would be helpful.


ahmetso
FREE

20 days ago

Even though npm ci --omit=dev is used, it still warns saying npm warn config production Use '—-omit=dev instead.
And it still tries to install dev-only dependencies such as redis-memory-server.
Why npm thinks it's not using --omit=dev?

1394847192216244500


ahmetso
FREE

20 days ago

When I run npm ci --omit=dev locally, it works. What's wrong with running it in the Railway deployment environment?


8 days ago

Hey @Joe G, can you try passing your commands as an array such as cmds = ["npm ci --omit=dev"]?


Why nixpacks.toml is ignored? - Railway Help Station