I can't publish codes from VS Code to Azure


(Arthurtu6153) #1

here are the version of node and npm on my machine

PS C:\Users\atu\source\repos\AzureToolKit\AzureToolKit> node -v
v10.15.1
PS C:\Users\atu\source\repos\AzureToolKit\AzureToolKit> npm -v
6.8.0

I keep getting this error when I tried to publish to Azure, the entire log…

1:25:47 PM azuretool: Deploying Local Git repository to “azuretool”…
1:25:31 PM azuretool: Updating branch ‘master’.
1:25:31 PM azuretool: Updating submodules.
1:25:31 PM azuretool: Preparing deployment for commit id ‘68131c4bb3’.
1:25:32 PM azuretool: Generating deployment script.
1:25:32 PM azuretool: Using cached version of deployment script (command: ‘azure -y --no-dot-deployment -r “D:\home\site\repository” -o “D:\home\site\deployments\tools” --aspNetCore “D:\home\site\repository\AzureToolKit\AzureToolKit.csproj” --solutionFile “D:\home\site\repository\AzureToolKit.sln”’).
1:25:32 PM azuretool: Running deployment command…
1:25:32 PM azuretool: Command: “D:\home\site\deployments\tools\deploy.cmd”
1:25:33 PM azuretool: Handling ASP.NET Core Web Application deployment.
1:25:37 PM azuretool: Restore completed in 638.34 ms for D:\home\site\repository\AzureToolKit\AzureToolKit.csproj.
1:25:38 PM azuretool: Microsoft ® Build Engine version 15.9.20+g88f5fadfbe for .NET Core
1:25:38 PM azuretool: Copyright © Microsoft Corporation. All rights reserved.
1:25:40 PM azuretool: Restore completed in 393.12 ms for D:\home\site\repository\AzureToolKit\AzureToolKit.csproj.
1:25:41 PM azuretool: AzureToolKit -> D:\home\site\repository\AzureToolKit\bin\Release\netcoreapp2.2\AzureToolKit.dll
1:25:41 PM azuretool: AzureToolKit -> D:\home\site\repository\AzureToolKit\bin\Release\netcoreapp2.2\AzureToolKit.Views.dll
1:25:46 PM azuretool: EXEC : npm ERR! error : Method Not Allowed [D:\home\site\repository\AzureToolKit\AzureToolKit.csproj]
1:25:47 PM azuretool: npm ERR! at errorResponse (D:\Program Files (x86)\npm\1.4.28\node_modules\npm\lib\cache\add-named.js:260:10)
1:25:47 PM azuretool: npm ERR! at D:\Program Files (x86)\npm\1.4.28\node_modules\npm\lib\cache\add-named.js:120:12
1:25:47 PM azuretool: npm ERR! at saved (D:\Program Files (x86)\npm\1.4.28\node_modules\npm\node_modules\npm-registry-client\lib\get.js:167:7)
1:25:47 PM azuretool: npm ERR! at Object.oncomplete (fs.js:108:15)
1:25:47 PM azuretool: npm ERR! If you need help, you may report this entire log,
1:25:47 PM azuretool: npm ERR! including the npm and node versions, at:
1:25:47 PM azuretool: npm ERR! http://github.com/npm/npm/issues
1:25:47 PM azuretool:
1:25:47 PM azuretool: npm ERR! System Windows_NT 6.2.9200
1:25:47 PM azuretool: npm ERR! command “node” “D:\Program Files (x86)\npm\1.4.28\node_modules\npm\bin\npm-cli.js” “install”
1:25:47 PM azuretool: npm ERR! cwd D:\home\site\repository\AzureToolKit\ClientApp
1:25:47 PM azuretool: npm ERR! node -v v0.10.40
1:25:47 PM azuretool: npm ERR! npm -v 1.4.28
1:25:47 PM azuretool: npm ERR! code E405
1:25:47 PM azuretool: npm
1:25:47 PM azuretool: D:\home\site\repository\AzureToolKit\AzureToolKit.csproj(39,5): error MSB3073: The command “npm install” exited with code 1.
1:25:47 PM azuretool: Failed exitCode=1, command=dotnet publish “D:\home\site\repository\AzureToolKit\AzureToolKit.csproj” --output “D:\local\Temp\8d696a8657876f7” --configuration Release
1:25:47 PM azuretool: An error has occurred during web site deployment.
1:25:47 PM azuretool: \r\nD:\Program Files (x86)\SiteExtensions\Kudu\79.20129.3767\bin\Scripts\starter.cmd “D:\home\site\deployments\tools\deploy.cmd”
Deployment to “azuretool” completed.


(Arthurtu6153) #2

fixed this issue-- need to set node.js version on Azure

https://blogs.msdn.microsoft.com/azureossds/2018/09/25/how-to-set-node-version-for-windows-node-js-webapp-from-azure-portal/


(system) closed #3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.