When trying to run grunt commands, I get the following error:
Error: EACCES, permission denied '/home' at Object.fs.readdirSync (fs.js:665:18) at Glob._readdir (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js:662:20) at Glob._process (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js:446:15) at Glob.iterator (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js:181:10) at Array.forEach (native) at new Glob (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js:179:22) at glob (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js:57:11) at Function.globSync [as sync] (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js:76:10) at /home/pathto/magento/node_modules/grunt/node_modules/findup-sync/lib/findup-sync.js:32:19 at Function.map (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.js:3509:27)
Error: EACCES, permission denied '/home' at Object.fs.readdirSync (fs.js:665:18) at Glob._readdir (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js:662:20) at Glob._process (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js:446:15) at Glob.iterator (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js:181:10) at Array.forEach (native) at new Glob (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js:179:22) at glob (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js:57:11) at Function.globSync [as sync] (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js:76:10) at /home/pathto/magento/node_modules/grunt/node_modules/findup-sync/lib/findup-sync.js:32:19 at Function.map (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.js:3509:27)
I've tried numerous fixes like running:
sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.npm
And haven't been able to get it to work. I'm assuming this is a permission problem, but not really sure. I tried running grunt commands w/ sudo but it looks like the grunt command isn't in the path for sudo. Any ideas how to fix this?