Let's see your gulpfile.js first.
I would personally not do anything gulp related on the server. Instead I'd do on my local machine and then use git push to have my Forge automatically git pull stuff on the server.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Heyho -
i edited my deploy script and added gulp --production to the tasks.
On my forge server i installed gulp with sudo npm install --global gulp after this i did a sudo npm install .
If i now run my deploy script i get the error message
odule.js:338
throw err;
^
Error: Cannot find module 'shellwords'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/forge/domain.com/node_modules/laravel-elixir/node_modules/gulp-notify/node_modules/node-notifier/lib/utils.js:5:18)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
I searched the web, but didnt found anything about this specific error. What could be the problem?
And is this the right way to minify the files on the server?
Please or to participate in this conversation.