Publish Error when adding azure-storage lib to VS project.

Mar 4, 2015 at 8:23 PM
I created a Basic NodeJS Azure Express 4 project to hopefully create an api for my site but when I try adding the new library azure-storge I get a publish error.

Auto ConnectionString Transformed Web.config into obj\Release\CSAutoParameterize\transformed\Web.config.
Copying all files to temporary location below for package/publish:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(2584,5): Error : Copying file .\node_modules\azure-storage\node_modules\request\node_modules\form-data\node_modules...

It adds the library to the package.json and everything looks fine it even runs locally but it won't publish.
Mar 5, 2015 at 5:39 AM
Edited Mar 5, 2015 at 5:39 AM
You might be hitting a max_path issue. Can you try running 'npm dedupe' and copying your files to a short path like c:/src and see if that helps?

Normally you get a warning but you may not during publish. We have an issue on it here:
Marked as answer by mousetraps on 3/23/2015 at 11:07 PM
Mar 5, 2015 at 1:35 PM
Edited Mar 5, 2015 at 1:35 PM
I had it like this C/folder/folder/project but i removed one of the folders and now it works. I have run into errors in the past that have these max path issues and it's irritating but at least it works now. Hopefully they will fix the issue in later versions so that won't be as likely to happen.

Mar 5, 2015 at 1:53 PM
Edited Mar 5, 2015 at 1:54 PM
Glad you got it working.

You can also try using git deploy to azure instead with node_modules in your .gitignore file. That way you don't have to deploy node_modules (everything is installed automatically with Kudu)
Mar 5, 2015 at 2:44 PM
I'll take a look. Thanks for the info. Also, I've created this project and azure website with NodeJS using the NodeJS tool but is it possible to make node part of an existing website? Or is it highly recommended to keep NodeJS as a separate project and use it like and API.