node.js - Azure Node.js Express应用程序scaffold.xml丢失

标签 node.js powershell azure

我正在按照 Microsoft 的“入门”教程将 Node.js Express 应用部署为云服务。

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

发生的情况是这样的:

PS C:\node> New-AzureServiceProject helloworld New-AzureServiceProject:找不到路径“C:\Program Files (x86)\Microsoft”的一部分 SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureRM.Profile\Resources\Scaffolding\General\scaffold.xml'。 行:1 字符:1 + 新-AzureServiceProjectexpressapp + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 类别信息:关闭错误:(:) [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

但是,该目录有子目录“Resources”,因此它永远找不到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

关于node.js - Azure Node.js Express应用程序scaffold.xml丢失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36630433/

相关文章:

Powershell 是否有一种简单的方法可以将 int 5 转换为字符串 5 或 68 转换为 68?

powershell - Windows在创建文件之前先获取文件的短路径

Azure 云服务和网站通信锁定

javascript - 为什么我得到两个输出,其中之一未定义?

javascript - 访问 Express 路由时加入 socket.IO 房间

node.js - 在 NodeJs 中杀死由 spawn 触发的 FFmpeg 进程

regex - 带有命名组的替换字符串中的 Powershell 变量

node.js - 用于 Express 的 mustache (类)模板引擎?

python - 如何将 storageaccount key 传递给 Linux VM?

Azure 应用程序见解内存使用情况