Search code examples
cypresscypress-cucumber-preprocessor

Unable to install Cypress in MAC via install npm install cypress --save-dev


Unable to install Cypress tool on Mac

npm install cypress --save-dev is not working niether npm install cypress
npm ERR! code EACCES
npm ERR! syscall open
npm ERR! path /Users/amitojkhurana/.npm/_cacache/tmp/0a7c5eac
npm ERR! errno -13
npm ERR! 
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR! 
npm ERR! To permanently fix this problem, please run:
npm ERR!   sudo chown -R 501:20 "/Users/amitojkhurana/.npm"

npm ERR! A complete log of this run can be found in: /Users/amitojkhurana/.npm/_logs/2024-04-03T23_00_24_412Z-debug-0.log

Solution

  • It's telling you what to do here:

    sudo chown -R 501:20 "/Users/amitojkhurana/.npm"