NPM cannot install dependencies - Attempt to unlock something which hasn't been locked

前端 未结 9 1597
独厮守ぢ
独厮守ぢ 2020-12-02 03:59

I\'ve been trying to run an npm install on my package.json file, but I\'m having a lot of trouble. It keeps saying \"Error: Attempt to unlock XXX, which hasn\'t been locke

9条回答
  •  被撕碎了的回忆
    2020-12-02 04:17

    None of this worked for me. I had to run literally as root by doing the following:

    sudo su -
    sudo npm install forever -g
    

    Then the package installed on Linux Ubuntu 14.04.

提交回复
热议问题