'TypeError: is not a function' in Node.js

前端 未结 8 1853
礼貌的吻别
礼貌的吻别 2021-02-03 16:48

I\'m getting the error while running the following code in Node.js

var assert = require(\'assert\');
var request = require(\'request\');
var index = require(\'./         


        
8条回答
  •  春和景丽
    2021-02-03 17:37

    This is happening because two files are referencing each other i.e You are calling function (s) from file A in file B and vice versa which is called Circular Dependency.

提交回复
热议问题