Unable to evaluate directory symlink: lstat ../modules/modules: no such file or directory

I am calling modules from one of the file which is in the root folder, cd ing works locally fine but when ran in pipeline its giving below error

Unable to evaluate directory symlink: lstat ../modules: no such file or
987 directory
988
989
990 Error: Failed to read module directory
991
992 Module directory does not exist or cannot be read