I had configured NPM-MSDeploy as following:
Installation:
npm install msdeploy --save
Added script in the package.json as:
"deploy": "msdeploy --verb sync --allowUntrusted true --source package=dist.zip --dest auto,ComputerName=https://hostname:8172/msdeploy.axd?site=site-name,UserName=domain\username,Password=password,AuthType=Basic,includeAcls=False"
and tried it by running "npm run deploy".
I had also tried it with same script and added config in package.json as:
"config": {
"ComputerName": "https://hostname:8172/msdeploy.axd?site=site-name",
"UserName": "domain\username",
"Password": "password",
"dest": "auto"
It gives error "ERROR_USER_UNAUTHORIZED" everytime.
FYI, the target server is on different domain and network.
Here is the screenshot of the error:

I had configured NPM-MSDeploy as following:
Installation:
npm install msdeploy --save
Added script in the package.json as:
"deploy": "msdeploy --verb sync --allowUntrusted true --source package=dist.zip --dest auto,ComputerName=https://hostname:8172/msdeploy.axd?site=site-name,UserName=domain\username,Password=password,AuthType=Basic,includeAcls=False"
and tried it by running "npm run deploy".
I had also tried it with same script and added config in package.json as:
"config": {
"ComputerName": "https://hostname:8172/msdeploy.axd?site=site-name",
"UserName": "domain\username",
"Password": "password",
"dest": "auto"
It gives error "ERROR_USER_UNAUTHORIZED" everytime.
FYI, the target server is on different domain and network.
Here is the screenshot of the error: