gpt4 book ai didi

npm - 为什么 'npm doctor'会产生权限错误?

转载 作者:行者123 更新时间:2023-12-03 17:10:16 29 4
gpt4 key购买 nike

当我跑 npm doctor我收到以前从未见过的权限错误:

Perms check on local bin folder     not ok  Check the permissions of files in /Users/Orome/node_modules/.bin
Perms check on global bin folder not ok Check the permissions of files in /usr/local/bin
我没有做任何我知道会导致此更改的更改。
是什么导致了这种情况,我该怎么办?
npm doctor的完整输出:
npm WARN checkFilesPermission error getting info for /Users/Orome/node_modules/.bin
npm ERR! checkFilesPermission Missing permissions on /usr/local/bin/.keepme (expect: executable)
Check Value Recommendation/Notes
npm ping ok
npm -v ok current: v7.0.10, latest: v6.14.8
node -v ok current: v15.2.0, recommended: v15.2.0
npm config get registry ok using default registry (https://registry.npmjs.org/)
which git ok /usr/local/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 not ok Check the permissions of files in /Users/Orome/node_modules/.bin
Perms check on global bin folder not ok Check the permissions of files in /usr/local/bin
Verify cache contents ok verified 9656 tarballs

npm ERR! Some problems found. See above for recommendations.
配置:
macOS: 10.15.7-x86_64
CPU: quad-core 64-bit haswell
HOMEBREW_VERSION: 2.5.9-52-g8cffae8
HOMEBREW_PREFIX: /usr/local
Clang: 12.0 build 1200
Java: 1.8.0_172
CLT: 12.1.0.0.1.1602137645
Xcode: 12.1

最佳答案

似乎 Homebrew 和 node 可能会失去同步并因此产生此错误。在任何情况下简单

npm install -g npm
照顾它。

关于npm - 为什么 'npm doctor'会产生权限错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64808053/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com