应用设置后为什么kudu节点版本不更新?

jtw3ybtb  于 2021-06-24  发布在  Kudu
关注(0)|答案(1)|浏览(387)

我一直在尝试将angular应用程序部署到azure应用程序服务,部署失败,并给出以下日志:

Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling ASP.NET Core Web Application deployment.
  Restore completed in 862 ms for D:\home\site\repository\src\Bearbersys.ui\Bearbersys.ui.csproj.
Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 418.94 ms for D:\home\site\repository\src\Bearbersys.ui\Bearbersys.ui.csproj.
  Bearbersys.ui -> D:\home\site\repository\src\Bearbersys.ui\bin\Release\netcoreapp2.2\Bearbersys.ui.dll
  Bearbersys.ui -> D:\home\site\repository\src\Bearbersys.ui\bin\Release\netcoreapp2.2\Bearbersys.ui.Views.dll
EXEC : npm ERR! error : Method Not Allowed [D:\home\site\repository\src\Bearbersys.ui\Bearbersys.ui.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.28\\node_modules\\npm\\bin\\npm-cli.js" "install"
  npm ERR! cwd D:\home\site\repository\src\Bearbersys.ui\ClientApp
  npm ERR! node -v v0.10.40
  npm ERR! npm -v 1.4.28
  npm ERR! code E405
D:\home\site\repository\src\Bearbersys.ui\Bearbersys.ui.csproj(39,5): error MSB3073: The command "npm install" exited with code 1.
Failed exitCode=1, command=dotnet publish "D:\home\site\repository\src\Bearbersys.ui\Bearbersys.ui.csproj" --output "D:\local\Temp\8d6e13963485ed1" --configuration Release
An error has occurred during web site deployment.
\r\nD:\Program Files (x86)\SiteExtensions\Kudu\81.10329.3844\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"

经过一些研究,我发现这与我的应用程序服务中的节点包有关,因此我尝试向其添加以下应用程序设置:

[
  {
    "name": "WEBSITE_NODE_DEFAULT_VERSION",
    "value": "10.15.3",
    "slotSetting": false
  }
]
``` `10.15.3` 是当前节点版本和创建angular应用程序时安装在我的计算机中的相同版本,即使成功应用了设置,重新部署后错误仍然存在。我还注意到日志显示的节点版本没有改变。

npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28

我可能做错了什么?
8mmmxcuj

8mmmxcuj1#

有关nodejs发布时间表,请参阅:https://github.com/nodejs/release
查找azure windows webapps中可用的当前nodejs版本,导航到此链接:

https://<yourwebappname>.scm.azurewebsites.net/api/diagnostics/runtime

只能使用此列表中可用的版本。
定期添加新版本,因此请使用 /api/diagnostics/runtime 上面的url。

相关问题