node-mysql2: Object.Entries不是一个函数



我正在尝试在Hostgator上设置nodejs项目。但在设置时,我得到下面的错误。任何帮助都会非常感激。我的node版本是16.8.0,npm版本是7.21.0

/home/dir/project_folder/node_modules/mysql2/lib/packets/index.js:49
Object.entries(ctorMap).forEach(([name, ctor]) => {
^
TypeError: Object.entries is not a function
at Object.<anonymous> (/home/dir/project_folder/node_modules/mysql2/lib/packets/index.js:49:8)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/dir/project_folder/node_modules/mysql2/lib/connection.js:23:17)
at Module._compile (module.js:577:32)

使用mysql包替换mysql2节点

相关内容

  • 没有找到相关文章

最新更新