M1 上的 npm macOS Mojave 全局 bin 文件夹权限错误
npm on M1 macOS Mojave global bin folder permissions error
当我 运行 npm doctor 我得到这个输出:
npm ERR! checkFilesPermission Missing permissions on /opt/homebrew/bin/.keepme (expect: executable)
Check Value Recommendation/Notes
npm ping ok
npm -v ok current: v8.3.0, latest: v8.3.0
node -v ok current: v17.3.0, recommended: v17.3.0
npm config get registry ok using default registry (https://registry.npmjs.org/)
which git ok /usr/bin/git
Perms check on cached files ok
Perms check on local node_modules ok
Perms check on global node_modules ok
Perms check on local bin folder ok
Perms check on global bin folder not ok Check the permissions of files in /opt/homebrew/bin
Verify cache contents ok verified 84 tarballs
npm ERR! Some problems found. See above for recommendations.
我可以看到有一个名为 .keepme 的文件是 0 位。具有这些权限:100644
我该如何解决这个问题?我已经看到 的 Intel Mac 也有同样的问题(但使用 x86 安装目录),但是 none 这些解决方案对我有用。
为了解决这个问题,我刚刚将 .keepme 文件的权限更改为 100744
当我 运行 npm doctor 我得到这个输出:
npm ERR! checkFilesPermission Missing permissions on /opt/homebrew/bin/.keepme (expect: executable)
Check Value Recommendation/Notes
npm ping ok
npm -v ok current: v8.3.0, latest: v8.3.0
node -v ok current: v17.3.0, recommended: v17.3.0
npm config get registry ok using default registry (https://registry.npmjs.org/)
which git ok /usr/bin/git
Perms check on cached files ok
Perms check on local node_modules ok
Perms check on global node_modules ok
Perms check on local bin folder ok
Perms check on global bin folder not ok Check the permissions of files in /opt/homebrew/bin
Verify cache contents ok verified 84 tarballs
npm ERR! Some problems found. See above for recommendations.
我可以看到有一个名为 .keepme 的文件是 0 位。具有这些权限:100644
我该如何解决这个问题?我已经看到
为了解决这个问题,我刚刚将 .keepme 文件的权限更改为 100744