解决方法就是将require变量替换成类似功能的import变量
在根目录找到js/plugins/SH_BenriCommands.js这个文件 用txt或者VS打开他(最好用VS,因为它可以看行数)
在这个文件夹中找到第3597行的那一大串代码 用下述代码替换
function SH_FileCheck(filePath) {
return import('fs').then(fs => {
const path = filePath;
if (fs.existsSync(path)) {
// 可以使用 fs 模块的其他功能
return true;
} else {
console.error(path + " は存在しません。");
return false;
}
}).catch(error => {
console.error('动态导入失败:', error);
return false;
});
}
替换之后保存重启就可以了