I'm trying to deploy an On Demand node.js WebJob on my Azure Website that uses a few node libraries, but every run generates the error
Failed to copy job files: System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
Taking out the libraries remedies the error, but then I can't run the WebJob. How do I get around this?
This is currently a known limitation with WebJobs/node.js/Windows.
Since the WebJob is running from the temporary directory (which has an already long path start) and node_modules in some cases tend to have long dependancy tree which concludes with files that have a long path and windows limitation of the path length.
Workarounds: