• 0

xCode: grunt: command not found


If you're using grunt or similar build tools to build your project you might run into this issue.
/Users/username/Library/Developer/Xcode/DerivedData/project/filename.sh: line 4: grunt: command not found
Here, xCode can not find grunt because it uses the system version of node.js. Hence, grunt has to be installed inside system node.js.
Solution:
  • install node.js
  • install node version manager nvm
  • $ nvm ls , you should see system in the list
  • $ nvm use system
  • $ npm install -g grunt
  • Now, grunt is available globally inside the system version. You should be good to go now.