Fatal error: Cannot read property 'uid' of undefined
graceful-fs/polyfills.js:264
if (stats.uid < 0) stats.uid += 0x100000000
For me karma is using graceful-fs
I just did an npm install, this is breaking the build with:
.../node_modules/graceful-fs/polyfills.js:264
if (stats.uid < 0) stats.uid += 0x100000000
TypeError: Cannot read property 'uid' of undefined
at .../node_modules/graceful-fs/polyfills.js:264:16
at FSReqWrap.oncomplete (fs.js:82:15)
Same thing started happening for me. Breaking our app build:
../node_modules/less/node_modules/graceful-fs/polyfills.js:264
if (stats.uid < 0) stats.uid += 0x100000000
TypeError: Cannot read property 'uid' of undefined
at ../node_modules/less/node_modules/graceful-fs/polyfills.js:264:16
at FSReqWrap.oncomplete (fs.js:82:15)
thieman, rmwxiong, awkaiser, normanrz, maxcodes, and KathyApplebaum reacted with hooray emoji
dschoeni, thieman, alexfoley, awkaiser, maxcodes, sumitkm, and LarsVonQualen reacted with heart emoji
All reactions
f528729 introduced a bug in which `fs.stat()` would
crash when the underlying call failed, because the
accessing `uid` and `gid` fields of the resulting `stats`
struct was attempted, which is `undefined` for failing
calls.
Fixes: isaacs#90
Fixes: isaacs#89
Fixes: isaacs#88
Still getting this , 5.2.2 and 5.3.0 and testing 5.1.2 will report back..
OK: Resolving.. but for anyone looking to reopen, see if:
you are trying to drop privileges from root pm2 call..
pm2 seems to communicate by reading files in your ~/.pm2 dir
you need to change the access on this dir to be read by other users..
this probably has a constraint you also shouldn't run any actual sudo processes via pm2 without dropping privileges