'While running a nodejs application in ,windows 10, that is managed by pm2 I cannot manipulate a file in a network location

I am using a pm2 installer found here that installs pm2 as a windows service. I have a nodejs application that has end points that can delete move rename files etc. When I hit those endpoints while running as a service I get I Error: EPERM: operation not permitted, unlink \\network-location\my-file.txt. I do not think that my problem is necessarily with this service in particular but that the files exist on a network location. The process works if the file is on the local disk. It also works if pm2 is not installed and started using the service but rather installed the traditional way npm install pm2 -g.

enter image description here enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source