Reading specific line from a file in function node

Welcome to the forum @KiwiTrinitrotoluene

nthline doesn't work like that, it returns a Promise which you have to use to wait for the result. Have a look at the readme to see how to use it. https://www.npmjs.com/package/nthline