I am trying to deploy a NestJS application on Railway.
I am using NPM as my package manager.
I have explicitly defined a run command and a build command in the project settings.
Whenever I try to deploy the project, I get the following error.
#13 3.042 npm WARN config production Use `--omit=dev` instead.
#13 3.134 npm ERR! Missing script: "install"
#13 3.134 npm ERR!
#13 3.134 npm ERR! Did you mean this?
#13 3.134 npm ERR! npm uninstall # Remove a package
#13 3.135 npm ERR!
#13 3.135 npm ERR! To see a list of scripts, run:
#13 3.135 npm ERR! npm run
#13 3.137
#13 3.137 npm ERR! A complete log of this run can be found in:
#13 3.137 npm ERR! /root/.npm/_logs/2023-01-14T18_01_46_797Z-debug-0.log
Has anybody experienced this before, where it can't recognize the install command?
I have tried with and without the custom build command, but every time it fails when running the npm run install
step in the docker container.
I think the command that should run to install is
npm install
instead ofnpm run install
. Have you tried checking the package.json file and tried adding"install": "npm install"
inside scripts