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

6ber6ou's avatar

gulp --production when deploy on Envoyer

Hi All.

Is it possible to run "gulp --production" automatically when I deploy my code on Envoyer ? I tried adding a hook with : cd {{ release }} gulp --production

But there is an error : [19:55:29] Local gulp not found in ~/default/releases/20151031185455 [19:55:29] Try running: npm install gulp

The release name change on every deploy, so should I add "npm install gulp" before "gulp --production" in my hook, or is there a better solution ?

0 likes
5 replies
jekinney's avatar

With envoyer every deployment is a new Laravel install. So you would have to run npm install as a hook. I don't think the node_modules are in any git ignore but still need to run the install to hook up all the dependencies out side of that. Then your gulp task should run just fine after that.

6ber6ou's avatar

I created a hook with "npm install" but I recive this error :

npm WARN peerDependencies The peer dependency vueify-insert-css@^1.0.0  included from vueify will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency babel-runtime@^5.8.25 included from vueify will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency vue-hot-reload-api@^1.2.0 included from vueify will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
bash: line 2:  1436 Killed                  npm install
6ber6ou's avatar

Ok but What is swap space and how can I.increase that ? Don't hesitate to explain like I was a 5 years old kid :) Cause I am a newbie with server-side.

lindstrom's avatar

Bump your version of Elixir to ^4.0.0 in composer.json to resolve the peerDepency issues.

The other response about memory is correct. Also, for your npm insall hook use: npm install --silent

If you want to watch cpu usage/memory consumption type "top" at yoru command prompt while your deployment is running. I had to resize on DO from 1GB to 2 to get npm to complete. I read something else about setting npm config set jobs = 1 (or something like that) but couldn't find the reference in the npm config docs so i didn't pursue it.

Edit: Assuming you also realized you could create add a hook for gulp --production after your npm install.

HTH!

Please or to participate in this conversation.