Getting an error on dockerising nest.js application Getting an error on dockerising nest.js application docker docker

Getting an error on dockerising nest.js application


@nestjs/cli (where the nest command comes from) is by default in devDependencies. Unless you've modified your deps in package.json, running npm i --production will not install @nestjs/cli which will lead to the error you currently have. You can either use a multi-staged dockerfile or move @nestjs/cli to your dependencies instead of devDeps.