I have a nodejs program that accesses files via fs in a network drive. When I run this program from the console everything goes fine. When the same program runs as a service wrapped with nssm (https://nssm.cc/) it returns an error "ENOENT: no such file or directory, scandir". I've try different solutions, including running the service as an administrator user with all permissions, but the error continues. Any help would be appreciated.
Asked
Active
Viewed 195 times
0
-
`ENOENT` means file/directory not found. please share stack trace (error log) it will have which file it was trying to access. – bogdanoff May 19 '22 at 11:40
-
First of all, thank you very much for your interest. It's not a file it's a network unit mapped to the computer where the node service is running. As I explained it is accessible if I run the program directly from the console (with node sercer.js for example). But when I run it as a service wrapped with nssm I received that error with no additional information, but a reference to the directory I want to access. The complete message is "{"message":"DAEMON ERROR: ENOENT: no such file or directory, scandir 'V:\\PreAlbaranCliente\\ALBARANES'","level":"error"}". – Rafael Garcia May 20 '22 at 06:30