npm install permission denied (macOS)

前端 未结 6 990
梦谈多话
梦谈多话 2021-02-07 15:08

To install a Bootstrap theme I want to run npm install. However I always receive a permission denied error.

I already tried nvm and then switched with

6条回答
  •  星月不相逢
    2021-02-07 15:53

    NPM_CONFIG_PREFIX=~/.npm-global

    Copy this line into ur terminal, then hit enter. then install the necessary packages you need WITHOUT the term "sudo" in front of npm.

    i.e.

    npm install -g jshint

提交回复
热议问题