TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Command for run gulp task is not working

    General Discussion
    2
    2
    95
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Renan HugoR
      Renan Hugo
      last edited by Renan Hugo

      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
      
      RussR 1 Reply Last reply Reply Quote 0
      • RussR
        Russ @Renan Hugo
        last edited by Russ

        @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
        

        Russell VanderMey

        1 Reply Last reply Reply Quote 0
        • First post
          Last post