最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

BrightSign 和 Node.js 14.x EROFS:只读文件系统

网站源码admin26浏览0评论

BrightSign 和 Node.js 14.x EROFS:只读文件系统

BrightSign 和 Node.js 14.x EROFS:只读文件系统

我需要这个神奇问题的答案:

我使用 fs.createWriteStream 将文本文件写入“storage/sd/”(就像在 BrightSign 文档中一样),它一开始任何时候都很好用。任何时候我都开始收到消息“EROFS:只读文件系统”。

如果每次都在非 brightsign 设备上运行良好,这可能是什么原因?

BrightSign 操作系统正在使用 Node.js 14.x

第一版

function writeFile(...messageArray:string[]): void {
   let writeStream = fs.createWriteStream(file_path, {flags: "a", autoClose: true});
   writeStream.write(messageArray.join("\n"));
}

第二个版本

function writeFile(...messageArray:string[]): void {
   let writeStream = fs.createWriteStream(file_path, {flags: "a", autoClose: true});
   writeStream.write(messageArray.join("\n"));
   writeStream.on("finish", () => console.log("complete"));
   writeStream.on("error", err => console.log(err));
}

在两个版本中,sutiation 完全相同。

回答如下:
发布评论

评论列表(0)

  1. 暂无评论