'Installing and publishing npm packages to remote server does not support the UNC path

I need to install new packages from DevOps on a remote machine for testing in Cypress. Unfortunately, I have a problem with install step, setting the UNC path and the installation is based on the wrong default path C: \ Windows

Is it even possible to install from DevOps to another server?

Starting: Install packages
==============================================================================
Task         : npm
Description  : Install and publish npm packages, or run an npm command. Supports npmjs.com and authenticated registries like Azure Artifacts.
Version      : 1.169.2
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/package/npm
==============================================================================
C:\Windows\system32\cmd.exe /D /S /C ""C:\Program Files\nodejs\npm.cmd" --version"
6.14.10
C:\Windows\system32\cmd.exe /D /S /C ""C:\Program Files\nodejs\npm.cmd" config list"
'\\phasp13jm2\UICypress'
; cli configs
CMD.EXE was started with the above path as the current directory.
metrics-registry = "https://registry.npmjs.org/"
UNC paths are not supported.  Defaulting to Windows directory.
scope = ""
user-agent = "npm/6.14.10 node/v12.20.1 win32 x64"

; environment configs
userconfig = "C:\\agent\\_work\\5\\npm\\1884.npmrc"

; builtin config undefined
prefix = "C:\\Windows\\ServiceProfiles\\NetworkService\\AppData\\Roaming\\npm"

; node bin location = C:\Program Files\nodejs\node.exe
; cwd = C:\Windows
; HOME = C:\Windows\ServiceProfiles\NetworkService
; "npm config ls -l" to show all defaults.

C:\Windows\system32\cmd.exe /D /S /C ""C:\Program Files\nodejs\npm.cmd" install"
'\\phasp13jm2\UICypress'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
npm WARN saveError ENOENT: no such file or directory, open 'C:\Windows\package.json'
npm WARN saveError EPERM: operation not permitted, open 'C:\Windows\package-lock.json.527580596'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Windows\package.json'
npm WARN Windows No description
npm WARN Windows No repository field.
npm WARN Windows No README data
npm WARN Windows No license field.


Sources

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

Source: Stack Overflow

Solution Source