What is unsafe-perm flag in npm?

Unsafe-perm flag is set to true to suppress the UID/GID (User Identifier/ Group Identifier) switching when running package scripts.The flag is explicitly set to false to prevent non-root user from installing packages.

If EACCESS error occurs while installing Electron, then running the installation through sudo and the unsafe-perm flag set to true will  install the package.


Leave a Reply