'Getting Warning: Accessing non-existent property 'aaa' of module exports inside circular dependency

I am receiving Warning: Accessing non-existent property 'aaa' of module exports inside circular dependency while i import an module inside myfile.

file1.js
const aaa= require('file1.js');

file2.js
const bbb = require(file2.js');

I read through lot of post but couldn't get the right solution. Please share your ideas.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source