随笔分类 - node
摘要:在es模块中使用__dirname时,会报错 The "__dirname is not defined in ES module scope" error occurs when we try to try to use the __dirname global variable in an ES
阅读全文
摘要:要node支持import等新语法,看这里你就都明白了 现状 大家在编写node相关代码时,肯定遇到过下面的问题 // a.js import fs from 'fs' ... // bash node a.js 在你没有做过任何处理的情况下,肯定会出现一个挺傻的错误 看到这里,你肯定会想,大清都亡
阅读全文