Javascript TypeError:createDebug.load不是函数
在尝试为使用AdonisJs构建的项目提供服务时,我面临以下错误 错误:Javascript TypeError:createDebug.load不是函数,javascript,node.js,Javascript,Node.js,在尝试为使用AdonisJs构建的项目提供服务时,我面临以下错误 错误: at setup (D:\NodeJsProjects\AdonisWallet\node_modules\knex\node_modules\debug\src\common.js:261:33) at Object.<anonymous> (D:\NodeJsProjects\AdonisWallet\node_modules\knex\node_modules\debug\src\node
at setup (D:\NodeJsProjects\AdonisWallet\node_modules\knex\node_modules\debug\src\common.js:261:33)
at Object.<anonymous> (D:\NodeJsProjects\AdonisWallet\node_modules\knex\node_modules\debug\src\node.js:236:37)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (D:\NodeJsProjects\AdonisWallet\node_modules\knex\node_modules\debug\src\index.js:9:19)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
我不知道为什么会这样。我已经使用const AddonModule=use('App/Models/Addon')正确导入了模型
代码似乎是这样的
await files.forEach(async (file) => {
var addon_name=file
const ad= await AddonModule.findBy('name', addon_name)
})
这看起来像是模块内部的问题,这很奇怪。尝试重新安装您的依赖项?@Bergi我删除了模块并重新安装了它们,但没有任何区别。我不确定模块调用为什么会导致这种情况。因为没有模块调用,它可以正常工作。
await files.forEach(async (file) => {
var addon_name=file
const ad= await AddonModule.findBy('name', addon_name)
})