You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
npm 包安装应该在没有
sudo
的情况下完成。除非修改系统范围的权限,否则永远不应使用sudo
。 Node 将 npm 包放在一个特定的文件夹中,通常是/usr/local/lib/node_modules
。但问题是你需要sudo
权限才能在这里写。这会导致无休止地使用非必需的sudo
权限。这个位置是我们需要改变的。我们可以通过以下方式来做到:如果使用了 Oh My Zsh,则编辑
~/.zshrc
NVM(Node 版本管理器)允许你在没有 root 权限的情况下安装 Node,还允许安装多个版本的 Node,非常适合开发。
Beta Was this translation helpful? Give feedback.
All reactions