try the following command sudo npm i --unsafe-perm if it doesn't work try the following sudo rm -rf ~/.node-gyp sudo npm cache clean -f sudo npm install -g n sudo n stable sudo npm i --unsafe-perm