Command for run gulp task is not working
-
The output.txt file is created, but the gulp task don't run, i have tried any other ways but the same result
GUI Command - Mac OS
Command:/Applications/XAMPP/xamppfiles/htdocs/cative/wp-content/themes/cative/gulp/gulp.sh------------- shell ------------
First try:
#!/usr/bin/env bash cd /Applications/XAMPP/xamppfiles/htdocs/cative/wp-content/themes/cative/gulp/ && npm run assistir exec > output.txt 2>&1
Second try:
#!/usr/bin/env bash cd /Applications/XAMPP/xamppfiles/htdocs/cative/wp-content/themes/cative/gulp/ && gulp assistir exec > output.txt 2>&1
-
@renan-hugo, please try this:
Run which gulp to get the path to the gulp command. Like this:
russ@russmac % which gulp /Users/russ/.nvm/versions/node/v8.17.0/bin/gulp
Then make your shell script something like this:
#!/usr/bin/env bash cd /Applications/XAMPP/xamppfiles/htdocs/cative/wp-content/themes/cative/gulp/ /Users/russ/.nvm/versions/node/v8.17.0/bin/gulp assistir > /tmp/output.txt 2>&1
For some reason you need to specify the full path to the executables you install via npm i -g. That's been my experience on Mac anyways.
If that doesn't work, please try running the gulp script like this:
node /Users/russ/.nvm/versions/node/v8.17.0/bin/gulp
Or even like this:
/Users/russ/.nvm/versions/node/v8.17.0/bin/node /Users/russ/.nvm/versions/node/v8.17.0/bin/gulp
To do that last one, you'll need the full path to your node executable which you can find with this command:
which node