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
Using fs.stat or fs.statSync on windows ends up throwing lots of exceptions.
For example (one of hundreds generated by running a gulp command.
Exception has occurred: Error
Error: ENOENT: no such file or directory, stat 'c:\code\antlr4ts\npm.COM'
at Object.fs.statSync (fs.js:940:11)
at Function.sync (c:\code\antlr4ts\node_modules\isexe\windows.js:41:23)
at Function.sync (c:\code\antlr4ts\node_modules\isexe\index.js:49:17)
at Function.whichSync [as sync] (c:\code\antlr4ts\node_modules\which\which.js:117:20)
at npmPath (c:\code\antlr4ts\node_modules\global-prefix\index.js:67:45)
at Object.<anonymous> (c:\code\antlr4ts\node_modules\global-prefix\index.js:30:15)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
The text was updated successfully, but these errors were encountered:
That error indicates that the path does not exist. Throwing an error makes sense in that case.
The ignoreErrors option might be what you're looking for. This will test whether or not a file is executable, but return false if any error is encountered. This is useful for files that might not exist. There is an example of this in the README.
Using
fs.stat
orfs.statSync
on windows ends up throwing lots of exceptions.For example (one of hundreds generated by running a
gulp
command.The text was updated successfully, but these errors were encountered: