部署Azure Web App(Angular)无法正常工作

ija*_*ung 1 deployment azure azure-web-sites asp.net-core angular

只是基本的Asp.net Core Deploy可以,但是Angular使Visual Studio 2017 Version Deploy无法正常工作。这里有什么问题?

Azure部署日志:正在运行部署命令...(错误)

Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling ASP.NET Core Web Application deployment.
Restore completed in 370.23 ms for
D:\home\site\repository\Developtive.Website\Developtive.Website.csproj.
Microsoft (R) Build Engine version 15.8.169+g1ccb72aefa for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

Restore completed in 157.22 ms for 
:\home\site\repository\Developtive.Website\Developtive.Website.csproj.

Developtive.Website -> 
:\home\site\repository\Developtive.Website\bin\Release\netcoreapp2.1
\Developtive.Website.dll

Developtive.Website -> 
:\home\site\repository\Developtive.Website\bin\Release\netcoreapp2.1
\Developtive.Website.Views.dll

EXEC : npm ERR! error : Method Not Allowed 
[D:\home\site\repository\Developtive.Website\Developtive.Website.csproj]
npm ERR!     at errorResponse (D:\Program Files (x86)\npm\1.4.28
\node_modules\npm\lib\cache\add-named.js:260:10)
npm ERR!     at D:\Program Files (x86)\npm\1.4.28\node_modules\npm\lib\cache\add-named.js:203:12
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)
npm ERR!     at Object.oncomplete (fs.js:108:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:

npm ERR!     <http://github.com/npm/npm/issues>
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "node" "D:\\Program Files (x86)\\npm\\1.4.28z\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd D:\home\site\repository\Developtive.Website\ClientApp
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! code E405
npm

D:\home\site\repository\Developtive.Website\Developtive.Website.csproj(38,5): error MSB3073: The command "npm install" exited with code 1.
Failed exitCode=1, command=dotnet publish "D:\home\site\repository\Developtive.Website\Developtive.Website.csproj" --output "D:\local\Temp\8d64929666d2c00" --configuration Release

An error has occurred during web site deployment.
\r\nD:\Program Files (x86)\SiteExtensions\Kudu\78.11022.3613\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

谢谢。

Jer*_*Liu 5

设置WEBSITE_NODE_DEFAULT_VERSION与在应用程序设置一个有效的版本。

在此处输入图片说明

建议使用8.11.1和10.6.0,https://<webappname>.scm.azurewebsites.net/api/diagnostics/runtime有关Azure上的所有版本,请参阅。