Category: macOS

  • Replacement of -d in xargs for MacOS

    Replacement of -d in xargs for MacOS

    As we all know -d will not work in macOS.

    Also, placeholder % will not work in macOS.

    Look at the following command which uses xargs in Ubuntu

    wp term generate category --format=ids --count=3 | xargs -d ' ' -I % wp term meta add % foo bar
    

    The above command will give the following error if you execute in macOS

    So in order to execute the above command in macOS, you could do the following:

    wp term generate category --format=ids --count=3 | xargs -n1 -I {} wp term meta add {} foo bar

    That’s it guys and girls!

  • Installing/Change PHP on your Mac

    Installing/Change PHP on your Mac

    First, unlink the version you want using the following command

    brew unlink php@8.0

    Then link your desired version using the following command

    brew link php@7.4

    Ref: https://daily-dev-tips.com/posts/installing-php-on-your-mac/

  • Fix – svn: error: The subversion command line tools are no longer provided by Xcode.

    Recently I got the following error on my Mac Terminal when I tried svn command.

    svn: error: The subversion command line tools are no longer provided by Xcode.

     

    To fix this, run following commands:

    sudo rm -rf /Library/Developer/CommandLineTools
    xcode-select --install

     

    Wait for the software to be installed. And you are done.

    Ref.:https://stackoverflow.com/questions/60869347/mac-command-line-tools-11-4-no-longer-has-svn

     

  • Download folder/files from server using ssh terminal

    You will need SCP installed on your system.

    Run the following command from your terminal

    scp -r username@host:/path/to/folder /Destination/path/of/local/machine/

    If you access the server via pem key, then command will be

    scp -r -i /path/to/pemkey.pem username@host:/path/to/folder /Destination/path/of/local/machine/

    That’s it.

  • Fix Node Sass does not yet support your current environment on macOS

    Video for who doesn’t like to read ;). And if you like the video then subscribe my channel and share this with others who has the same issue.

    How to fix Node Sass does not yet support your current environment on macOS | Saas | npm | gulp

    Recently I came across this below error when I tried to run npm start command on my Mac.

    Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (79)
    For more information on which environments are supported please see:
    https://github.com/sass/node-sass/releases/tag/v4.12.0

    So you can fix this with 2 steps only.

    1. Open your package.json file and in “devDependencies” section, change “gulp-sass” version to “^3.0.1” and save the file.

     

     

     

     

     

     

     

    2. Run npm install

    After doing this, your issue should be fixed. Now you can run npm start

    And it’s done!!!!

    Ref: https://github.com/jakearchibald/wittr/issues/20#issuecomment-342740559