none
[Node.js][Web Apps][Service Bus] Node.js - Azure SDK issue RRS feed

  • Question

  • Right now I'm unbelievably frustrated with the azure-sb npm module. After having added it to a recent project, and deploying it to our Azure Webapp, all subsequent npm update and/or install commands fail. This is due to the extreme package hierarchy the azure-sb module built upon installing. At this point I need to remove it from our Azure Webapp's filesystem; easier said than done. Due to the 300+ character pathnames of deep-nested files, commands are failing during attempts to remove/replace it. So far I've tried the following without luck:

    • Deleting the folder via ftp. Failed.
    • Executing from the Kudo Command prompt (.scm) npm uninstall azure-sb. Failed
    • Setting dependencies to {} within package.json and running npm prune (kudo command prompt also). Failed
    • Renaming folders to shorten the length. Failed.

    If anyone else has ran into this before and has a clean solution for resolving this, let me know. Ironic how it's Microsoft's node module that is defeated by it's own file system shortcomings.

    --- UPDATED  10-2 --- 

    My post appears to have caused confusion, so let me clarify for those unfamiliar with Node.js and its package manager (npm). Npm is very similar to RubyGems; allowing for post-publish library dependency installation. Azure offers a SDK suite for their services in Node.js. The specific service I'm pulling into my Node.js application is the Azure Service Bus (aka. azure-sb) SDK.

    The Azure Service Bus module imports the Azure Common module; this is the poorly designed library that imports the dependency chain, that upon executing npm install (the command to install the dependencies for the entire project), creates this 20+ directory tree with files' whose pathnames exceed the MAX character limit. This results in inability to manage this module via npm, which results in failure to the npm command running. 

    Azure SDK for Node.js

    About NPM




    Thursday, October 1, 2015 11:17 PM

Answers

  • Please specify an npm version greater than 3 or include a deploy script which flattens your npm directory. To specify an npm version, in your package.json, specify:

    {..."engines":{"npm":">=3.0.0"}...}

    https://docs.npmjs.com/files/package.json#engines

    This isn't specific to App Service or azure-sb, but rather NPM + Windows. NPM 3.x finally addresses these issues. :)

    Friday, October 2, 2015 5:26 PM

All replies

  • Hi,

    Make sure you have stopped the Web App before attempting to remove the folders or files, they may be in use with the process.

    You might also consider attaching the link to the technology you refer to and the instructions you used to install the component you are having difficulty with, this would help those reading the comment better understand and provide feedback.

    HTH, Benjamin

    Friday, October 2, 2015 7:50 AM
  • I don't even know how to respond to your first suggestion...very poor attempt to resolve the issue.

    However, I do appreciate your feedback and went ahead and updated my post. 

    Friday, October 2, 2015 4:56 PM
  • Please specify an npm version greater than 3 or include a deploy script which flattens your npm directory. To specify an npm version, in your package.json, specify:

    {..."engines":{"npm":">=3.0.0"}...}

    https://docs.npmjs.com/files/package.json#engines

    This isn't specific to App Service or azure-sb, but rather NPM + Windows. NPM 3.x finally addresses these issues. :)

    Friday, October 2, 2015 5:26 PM