Thursday 19 November 2015

Importing Module Not Working From Different Folder

I've made a module in a folder. I created a test.js file in that same folder and required the module..var DB = require('./Actions'); to test the module out and it works. I then implemented the module in a different folder with the exact same test code..var DB = require('../../../Database/Actions'); And it throws a module-specific error.What reasons could there be? Permissions? I was going to link to the repo but it's on a private git since it's for work. What other information would be needed to assist? Not sure what I can show that would help without seeing the rest of the code.

Submitted November 19, 2015 at 05:59PM by natdm

No comments:

Post a Comment