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
% yarn -v
2.2.2
% yarn node
Welcome to Node.js v14.7.0.
Type ".help"for more information.
> const fs = require( 'fs' ).promises;
undefined
> fs.open( './index.js' ).then( fd =>fd.stat() ).then( stat => console.log( stat ) );
Promise { <pending> }
> (node:76736) UnhandledPromiseRejectionWarning: TypeError: p.match is not a function
at Function.resolveVirtual (/x/.pnp.js:5170:21)
at VirtualFS.mapToBase (/x/.pnp.js:5207:22)
at VirtualFS.statPromise (/x/.pnp.js:4948:41)
at PosixFS.statPromise (/x/.pnp.js:4948:24)
at FileHandle.stat (/x/.pnp.js:8077:27)
at repl:1:40
FileHandle { fd: 17 }
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type number (17)
at new NodeError (node:internal/errors:363:5)
at validateString (node:internal/validators:119:11)
at Object.isAbsolute (node:path:1157:5)
at VirtualFS.mapToBase (.pnp.cjs:14620:24)
at VirtualFS.statPromise (.pnp.cjs:14345:41)
at PosixFS.statPromise (.pnp.cjs:14345:24)
at URLFS.statPromise (.pnp.cjs:14345:24)
at FileHandle.stat (.pnp.cjs:17754:27)
at test.js:4:12 {
code: 'ERR_INVALID_ARG_TYPE'
}
I think that the source of this problem is calling a function (in this specific scenario statPromise) from URLFS (respectively from ProxiedFS<NativePath, NativePath>) in patchFs.ts:230
The text was updated successfully, but these errors were encountered: