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出于安全考虑不支持以root用户运行,即使你用root用户身份运行了,npm会自动转成一个叫nobody的用户来运行,而这个用户几乎没有任何权限。这样如果你脚本里有一些需要权限的操作系统就会崩掉。
解决方法:
为了避免这种情况,我们可以加上一个 --unsafe-perm 的参数,这样就不会切换到nobody上,运行时是哪个用户就是哪个用户,即使是root。
Beta Was this translation helpful? Give feedback.
All reactions