繁体   English   中英

Azure Node.js Express App scaffold.xml缺失

[英]Azure Node.js Express App scaffold.xml Missing

遵循Microsoft的“入门”教程,将Node.js Express应用程序部署为Cloud Service。

在两台机器(一台Win 7和一台Win 8)上仔细安装所有工具之后,我开始生成“Hello World”,教程建议在Windows PowerShell中运行直观命名的: New-AzureServiceProject helloworld

这是发生的事情:

PS C:\\ node> New-AzureServiceProject helloworld New-AzureServiceProject:找不到路径'C:\\ Program Files(x86)\\ Microsoft SDKs \\ Azure \\ PowerShell \\ ResourceManager \\ AzureResourceManager \\ AzureRM.Profile \\ Resources \\ Scaffolding的一部分\\一般\\ scaffold.xml”。 在行:1 char:1 + New-AzureServiceProject expressapp + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo: CloseError:(:) [New-AzureServiceProject],DirectoryNotFoundException + FullyQualifiedErrorId:Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding.NewAzureServiceProjectCommand

纵观我的系统中安装PowerShell和在Azure SDK后的指示, 有一个目录:

C:\\ Program Files(x86)\\ Microsoft SDKs \\ Azure \\ PowerShell \\ ResourceManager \\ AzureResourceManager \\ AzureRM.Profile

然而,目录没有子目录“资源”,因此它永远不会找到scaffold.xml文件....

我尝试在AzureRM.profile中创建子目录Resources \\ Scaffolding \\ General。 这改变了错误,只是“找不到scaffold.xml”

我尝试将“常规”上的写入位置设置为大开。 没变。

以上错误在Win 8机器上。 在我的Win 7机器上仔细挖掘安装并深入了解教程中未提及的先决条件后,AzureRM.Profile最终安装在C:\\ Program Files \\ C:\\ Program Files \\ WindowsPowerShell \\ Modules中而不是C:\\ Program Files(x86)\\ Microsoft SDKs \\ Azure \\ PowerShell \\ ResourceManager \\ AzureResourceManager但行为完全相同。

我已经浏览了整个网络,并且无法找到有关可能指向解决方案的缺失scaffold.xml的任何信息。 这是New-AzureServiceProject创建应用程序所需的模板吗? 或者这是应该由New-AzureServiceProject生成的东西?

任何建议,将不胜感激...

谢谢!

我通过复制文件夹解决了这个问题
C:\\ Program Files(x86)\\ Microsoft SDKs \\ Azure \\ PowerShell \\ ServiceManagement \\ Azure \\ Services \\ Resources

C:\\ Program Files(x86)\\ Microsoft SDKs \\ Azure \\ PowerShell \\ ResourceManager \\ AzureResourceManager \\ AzureRM.Profile

需要从以下位置复制Resources文件夹:

C:\\ Program Files \\ WindowsPowerShell \\ Modules \\ Azure \\ 3.1.0 \\ Compute

C:\\ Program Files \\ WindowsPowerShell \\ Modules \\ AzureRM.profile \\ 2.3.0 \\ Resources \\ Scaffolding \\ General

根据PowerShell的错误消息,您似乎错过了已安装的powershell AzureRM.*模块。

请尝试从以管理员身份运行的Windows PowerShell控制台运行以下命令:

PS C:\> Install-Module AzureRM
PS C:\> Install-AzureRM

然后再次运行New-AzureServiceProject helloworld

同时,如果要在Azure Web Apps上开始使用node.js应用程序,可以参考Azure网站Cmdlet

为可怕的经历道歉。 这看起来像是一个特定版本的Azure PowerShell中的错误。 要进行诊断,我们需要知道哪个版本 - 如果您使用msi安装程序或WebPI,您将在“卸载程序”控制面板中找到这些内容,条目为“Microsoft Azure PowerShell”。

一些注释中的一个混淆 - 托管服务cmdlet是Azure中旧的RDFE(服务管理)命令的一部分。 支持这些的cmdlet位于“Azure”模块中,而不是任何“AzureRM”模块中。

要安装最新版本,我强烈建议您使用Web Platform Installer,或者可以从我们的GitHub存储库中检索的msi安装程序。 如果您对PowerShell模块管理非常熟悉,PowerShell Gallery也是一个很好的解决方案。

我将把这个教程提请文档团队注意。 同时,如果您可以识别azure powershell版本和您正在使用的sdk版本,我可以看看是否有问题的修复程序。

复制内容

C:\\ Program Files \\ WindowsPowerShell \\ Modules \\ Azure \\ 4.3.1 \\ Services \\ Resources \\ Scaffolding \\ General

C:\\ Program Files \\ WindowsPowerShell \\ Modules \\ AzureRM.profile \\ 3.3.1 \\ Resources \\ Scaffolding \\ General

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM