TypeError [ERR_INVALID_ARG_TYPE]:“路径”参数必须为字符串类型。收到的类型未定义。 Discord.JS V 12.3.1

时间:2020-09-24 01:05:55

标签: javascript

我已经研究了很多,但我的依赖项与人们所说的升级/降级并不一致。我相信这与我尚未安装的react有关。我尝试安装它们以查看是否有帮助,但无济于事。

我正在使用: Discord.js V 12.3.1 Fs V 0.0.1-安全 nodemon 2.04 路径0.012.7 以及它们所有的依赖关系。

这里有点问题:

    commandHandler(path){
this.fs.readdirSync(this.path.normalize(path)).map((f) => {
    const File = require (this.path.join(__dirname, `..`, path, f));
    this.commands.set(File.name, File);
})

0 个答案:

没有答案