Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

theUnforgiven's avatar

NPM error on Vapor

Hi all,

Trying to setup a production env on Vapor and I get the following error:

 The command "npm install && npm run production && rm -rf node_modules" failed.

  Exit Code: 2(Misuse of shell builtins)

  Working directory: /Users/lee/code/nrs/.vapor/build/app
0 likes
3 replies
themsaid's avatar

Hey,

This command runs on your machine so you need to find out why it's failing and update/remove it if you want. It's just there by default as an example of what you can do with Vapor.

theUnforgiven's avatar

So it doesn’t need to be there in order to deploy the node modules folder?

themsaid's avatar

No, you can remove it if you don't need it.

Please or to participate in this conversation.