NEET 07/05/2023 (Wed) 04:54 No.723125 del
>>723123
I am trying to schedule a cronjob to run my node app. The cronjob is setup with the correct SHELL and PATH vars but when it attempts to run my script, node itself fails because it can't reference the modules I'm pulling in form the entry point file.
These are modules from both node_modules/ and other js files I've written.
I'm pretty confident it'll work if I require them via their absolute path but am trying to understand why it doesn't just work anyway, if they're referenced as a relative path and also exist in the same directory as the script that's running.
So does this mean that the cronjob exists in a seperate environment, and even if it does, why would that cause an issue with pulling in other files in the same directory?