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

前端 未结 8 1831
礼貌的吻别
礼貌的吻别 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:31

    This happened to me many times because of circular dependency, check if you have 2 classes that are requiring each other, remove one of them from requiring the other and the issue should be solved

提交回复
热议问题