tree-node-cli icon indicating copy to clipboard operation
tree-node-cli copied to clipboard

Running in the root directory of a Windows hard drive is not supported

Open TajangSec opened this issue 8 months ago • 0 comments

error

PS D:\> tree -d
node:internal/fs/utils:350
    throw err;
    ^

Error: EPERM: operation not permitted, lstat 'System Volume Information'
    at Object.lstatSync (node:fs:1668:3)
    at C:\Users\Tajang\AppData\Roaming\npm\node_modules\tree-node-cli\src\index.js:122:10
    at Array.filter (<anonymous>)
    at print (C:\Users\Tajang\AppData\Roaming\npm\node_modules\tree-node-cli\src\index.js:121:25)
    at tree (C:\Users\Tajang\AppData\Roaming\npm\node_modules\tree-node-cli\src\index.js:160:10)
    at Object.<anonymous> (C:\Users\Tajang\AppData\Roaming\npm\node_modules\tree-node-cli\bin\tree.js:60:16)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12) {
  errno: -4048,
  syscall: 'lstat',
  code: 'EPERM',
  path: 'System Volume Information'
}

Node.js v18.17.1

and

PS D:\> npm uninstall tree-node-cli
npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path D:\
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'D:\'
npm ERR!  [Error: EPERM: operation not permitted, mkdir 'D:\'] {
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: 'D:\\'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in: C:\Users\Tajang\AppData\Local\npm-cache\_logs\2025-03-14T09_24_49_619Z-debug-0.log

TajangSec avatar Mar 14 '25 09:03 TajangSec