try_node_exec only uses node_modules/.bin of path where you open nvim.
If you're in a parent folder, e.g. a/b/script.ts, open nvim, and the child folder contains node_modules/.bin, e.g. a/b/node_modules/.bin, then try_node_exec doesn't find executables in a/b/node_modules/.bin.