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
{{ message }}
Repository navigation
[BUG] npm doctor erroneously reports permissions problem for nonexistent ~/node_modules & /.bin #2856
There's a problem with npm doctor reporting not ok Check the permissions of files in $HOME/node_modules (should be owned by current user) for Perms check, even when those directories don't exist. Started around 7.5.x I believe, sorry not sure exactly which version. But continues as of 7.11.2.
$ pwd
/Users/luke
$ npm doctor
npm WARN checkFilesPermission error getting info for /Users/luke/node_modules
npm WARN checkFilesPermission error getting info for /Users/luke/node_modules/.bin
Check Value Recommendation/Notes
npm ping ok
npm -v ok current: v7.11.1, latest: v7.11.1
node -v ok current: v16.0.0, recommended: v16.0.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 not ok Check the permissions of files in /Users/luke/node_modules (should be owned by current user)
Perms check on global node_modules ok
Perms check on local bin folder not ok Check the permissions of files in /Users/luke/node_modules/.bin
Perms check on global bin folder ok
Verify cache contents ok verified 3148 tarballs
npm ERR! Some problems found. See above for recommendations.
$ stat /Users/luke/node_modules
stat: /Users/luke/node_modules: stat: No such file or directory
$ stat /Users/luke/node_modules/.bin
stat: /Users/luke/node_modules/.bin: stat: No such file or directory
changed the title [-][BUG] npm doctor erroneously reports permissions problem for ~/node_modules[/-][+][BUG] npm doctor erroneously reports permissions problem for nonexistent ~/node_modules & /.bin[/+]on Apr 27, 2021
$ npm doctor
Check Value Recommendation/Notes
npm ping ok
npm -v ok current: v8.5.4, latest: v8.5.4
node -v ok current: v17.7.0, recommended: v17.7.0
npm config get registry ok using default registry (https://registry.npmjs.org/)
which git ok /opt/homebrew/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 ok
Verify cache contents ok verified 5473 tarballs
Check Value Recommendation/Notes
npm ping ok
npm -v ok current: v8.5.5, latest: v8.5.5
node -v ok current: v16.14.2, recommended: v16.14.2
npm config get registry ok using default registry (https://registry.npmjs.org/)
which git ok /usr/local/bin/git
Perms check on cached files not ok Check the permissions of files in /Users/tim/.npm (should be owned by current user)
Perms check on local node_modules not ok Check the permissions of files in /Users/tim/node_modules (should be owned by current user)
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 /usr/local/bin
Verify cache contents ok verified 7487 tarballs
Activity
luckman212 commentedon Apr 18, 2021
Anyone else seeing this? Is it a mis-configuration on my end?
[-][BUG] npm doctor erroneously reports permissions problem for ~/node_modules[/-][+][BUG] npm doctor erroneously reports permissions problem for nonexistent ~/node_modules & /.bin[/+]darcyclarke commentedon May 7, 2021
Known issue with
npm doctorat the moment; Needs much love... setting priority accordinglywraithgar commentedon Mar 3, 2022
#4495
wraithgar commentedon Mar 10, 2022
Fixed in
v8.5.4luckman212 commentedon Mar 10, 2022
Thanks @wraithgar
Confirmed! 🚀
Tim4497 commentedon Mar 31, 2022
same for me but I have over 1000 warnings: