-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
calling function in each other module is not working #2923
Comments
You have a circular dependency in your modules. |
By the way, you can "fix" this code by moving |
There is another way to fix the circular dependency issue without changing the order of statements. index.js File:
Test.js File:
Test2.js File:
|
both of the example i have tried. @targos @Trott, i am trying solution that @Trott has provided. if i'll get solution than i will let you know. // Hello, and welcome to hacking node.js! RangeError: Maximum call stack size exceeded |
@imVinayPandya That's exactly what you should get. |
@ChALkeR ya i got it. thank you for your time. |
@targos Hello targos. Could i know what is difference between 'exports' and 'module.exports' on circular dependency problem? |
i have three files: is not working,
when i am running index.js file its giving me an error in file Test2.js TypeError: one.oneFunction is not a function
index.js File:
Test.js File:
Test2.js File:
The text was updated successfully, but these errors were encountered: