Npm error “Error: EACCES: permission denied, mkdir '../node-sass/build'”

前端 未结 4 820
栀梦
栀梦 2021-02-14 14:45

Can\'t install the node-sass package via npm sudo npm i, i have been trying to resolve via sudo npm i -g node-sass --unsafe-perm=true --allow-root but

4条回答
  •  半阙折子戏
    2021-02-14 14:58

    Do nothing .. simply add --unsafe-perm to it

    Give it unsafe permission access.

    So, let's say.. if you were previously installing bcrypt library

    sudo npm install --save bcrypt
    

    then now write

    sudo npm install --unsafe-perm --save bcrypt
    

    And you are done.

提交回复
热议问题