Node modules not installed during deployment

Hi there,

I have a Laravel application that has some node modules, that have to be installed. In the Deployment Hooks, “Install NPM Packages” is enabled, but after the deployment, there is no node_modules folder.

When I cd to the release directory and run npm ci, the required modules are getting installed into the node_modules folder and everything runs as expected.

Is there maybe a bug with “Install NPM Packages”?

Thanks!
Sebastian

Hello @sewid,

The node_modules folder typically isn’t required after build. But, there may some use-cases where it is; which sounds like where you may be running into. In this case, disable the ‘Clean Node Artifacts’ deployment step and this will keep the node_modules folder.

That’s it, thanks a lot! It is working now :slight_smile:

1 Like