TypeError:fs.writeFileSyns不是函数
var fs = require("fs");
var newFile = fs.readFileSync("readMe.txt", "utf8");
fs.writeFileSyns("writeMe.txt", newFile);
答案 0 :(得分:1)
您的代码中有一个错字,应该是fs.writeFileSync("writeMe.txt", newFile);
,
var fs = require("fs");
var newFile = fs.readFileSync("readMe.txt", "utf8");
fs.writeFileSync("writeMe.txt", newFile);