摘要: 报错: __dirname is not defined in ES module scope 前言 新版 NodeJS 支持通过 ESM 方式导入模块,代码如: // CommonJS 规范(旧) const { readFileSync, writeFileSync } = require('f 阅读全文
posted @ 2022-08-29 12:34 MegaSu 阅读(6254) 评论(0) 推荐(0) 编辑