I have a directory structure as follows:
home/
├── module1/
│ ├── index.js
│ └── file.csv
└── module2/
└── index.js
Module 1 index.js
has code that reads in file.csv
using a node module called csvtojson
. module2/index.js
requires module1/index.js
.
When I run the code directly from module1 everything works fine and the file is read in successfully. However, when I run the code in module2 I get a "File does not exist." error. Do I need to explicitly make all of my paths absolute?