Publish-AzureServiceProject command failed for node.js application

Problem

I am following this tutorial to deploy node.js application from my machine to windows azure: https://www.windowsazure.com/en-us/develop/nodejs/tutorials/getting-started/

my command is as below:

Publish-AzureServiceProject -ServiceName socketlistener -Location "East US" -Launch

but I am getting the following error

Publishing  to Windows Azure. This may take several minutes...

1:32:36 PM - Preparing runtime deployment for service 'socketlistener'
1:32:38 PM - Preparing deployment for socketlistener with Subscription ID: ***...
1:32:40 PM - Verifying storage account 'socketlistener'...

Publish-AzureService : Path for package doesn't exist in D:\dev\node\socketlistener\cloud_package.cspkg.
At line:1 char:21
Publish-AzureService <<<<
CategoryInfo : CloseError: (:) [Publish-AzureService], FileNotFoundException
Problem courtesy of: user1522002

Solution

What I am suspecting is that there is some issue with your application configuration (Service Definition or Service Configuration) which is causing problem in package creation. The error message also suggests the same problem. Based on Publish-AzureServiceProject command execution the next step is to create the package after verifying the storage account. And after the package creation, the next step is to connect service endpoint which you can verify in the same link above you are following in tutorial.

To verify that there is no issue with your machine or connection to Windows Azure application, try creating a new Node.js application, add new web/worker role and do not make any changes in configuration then try deploying. This will verify if there is any issue with your machine configuration (if any) or other issue:

  • New-AzureServiceProject your_node_project
  • Add-AzureNodeWebRole
  • Publish-AzureServiceProject -ServiceName socketlistener -Location "East US" -Launch
Solution courtesy of: AvkashChauhan

Discussion

There is currently no discussion for this recipe.

This recipe can be found in it's original form on Stack Over Flow.