“fs.createReadStream() is not a function” error(Javascript)

爷,独闯天下 提交于 2021-01-29 07:50:44

问题


In my project of web development i need to use fs.createreadstream() function but >unfortunately filesystem is not availabe for browsers as of my knowledge. I tried >using level-filesystem,file-sytem,level-fs packages but everytime Im getting the >createreadstream() is not a function error .How to handle this problem???


回答1:


I believe the browserify utility will allow you to use node.js style require statements like:

var fs = require('fs');


来源:https://stackoverflow.com/questions/38468205/fs-createreadstream-is-not-a-function-errorjavascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!