azure web app放弃“没有此类文件或目录错误”

enxuqcxy  于 2021-06-21  发布在  Kudu
关注(0)|答案(1)|浏览(424)

我正在尝试将node.js应用程序添加到azure。我已使用az login命令登录。我执行了命令

az webbapp up --name azuredemoapp

这就是我犯的错误getting:-

The command failed with an unexpected error. Here is the traceback:

[Errno 2] No such file or directory: ''
Traceback (most recent call last):
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-p8t_6awn\knack\knack\cli.py", line 206, in invoke
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-p8t_6awn\azure-cli-core\azure\cli\core\commands\__init__.py", line 603, in execute
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-p8t_6awn\azure-cli-core\azure\cli\core\commands\__init__.py", line 661, in _run_jobs_serially
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-p8t_6awn\azure-cli-core\azure\cli\core\commands\__init__.py", line 652, in _run_job
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-p8t_6awn\azure-cli\azure\cli\command_modules\appservice\commands.py", line 55, in _polish_bad_errors
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-p8t_6awn\azure-cli-core\azure\cli\core\commands\__init__.py", line 631, in _run_job
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-p8t_6awn\azure-cli-core\azure\cli\core\commands\__init__.py", line 306, in __call__
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-p8t_6awn\azure-cli-core\azure\cli\core\__init__.py", line 485, in default_command_handler
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-p8t_6awn\azure-cli\azure\cli\command_modules\appservice\custom.py", line 2783, in webapp_up
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-p8t_6awn\azure-cli\azure\cli\command_modules\appservice\_create_util.py", line 59, in get_runtime_version_details
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-p8t_6awn\azure-cli\azure\cli\command_modules\appservice\_create_util.py", line 192, in parse_netcore_version
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\xml\etree\ElementTree.py", line 1196, in parse
tree.parse(source, parser)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\xml\etree\ElementTree.py", line 586, in parse
source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory: ''

  To open an issue, please run: 'az feedback'

这是我的package.json文件

{
  "name": "azuredemodeploy",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node index.js"
  },
  "author": "Rohan Shenoy",
  "license": "ISC",
  "dependencies": {
    "express": "^4.17.1"
  }
}
b1uwtaje

b1uwtaje1#

问题很可能是部署应用程序的方式,或者是项目中文件的结构。
请确保您的项目根目录中有server.js或app.js。也可以在packages.json中指定自定义启动脚本。有关更多信息,请参见此处:
https://docs.microsoft.com/en-us/azure/app-service/deploy-local-git#prepare-您的存储库

相关问题