admin管理员组文章数量:1023838
I have a simple node setup and Im trying to read a directory in my mac, but i seem to get an error, previously there was no error. Im confused whether i should change yarn setting or not
the error im getting -> Error: EISDIR: illegal operation on a directory, read
var folder = "/Users/rahul/cosmos/repo/fonts/ofl"
try {
let files = fs.readFileSync(folder)
console.log('the files ------>', files)
} catch(e) {
console.log('the error is ---->', e)
}
I have a simple node setup and Im trying to read a directory in my mac, but i seem to get an error, previously there was no error. Im confused whether i should change yarn setting or not
the error im getting -> Error: EISDIR: illegal operation on a directory, read
var folder = "/Users/rahul/cosmos/repo/fonts/ofl"
try {
let files = fs.readFileSync(folder)
console.log('the files ------>', files)
} catch(e) {
console.log('the error is ---->', e)
}
本文标签:
版权声明:本文标题:javascript - how to fix "Error: EISDIR: illegal operation on a directory, read" error? - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745556790a2155924.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论