Seth Seth - 1 year ago 246
Git Question

Azure deployment of Swagger Node.js generated server bundle using Git failing

I'm having some difficulties deploying my project to azure. I've created a web-app and followed all the steps in deployment but it seems that some of the libraries are causing problems in that their system path is too long..
Your expert input is welcome!

Thanks so much.

Below is the log produced by Azure.

Invalid path for filesystem 'D:/home/site/repository/node_modules/swagger-tools/node_modules/swagger-converter/node_modules/lodash.clonedeep/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/.gitattributes': The data area passed to a system call is too small.\r\n


I removed the node_modules folder and let Azure download the libraries needed. This got further but still produced errors. Below is the past-bin with my errors.


I used the console to manual attempt to install the libraries. Here's the results..

D:\home\site>npm install swagger-tools -g
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "D:\Program Files (x86)\nodejs\4.4.7\node.exe" "D:\Program Files (x86)\npm\2.15.8\node_modules\npm\bin\npm-cli.js" "install" "swagger-tools" "-g"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! path D:\local\AppData\npm\node_modules\swagger-tools\node_modules\swagger-converter\node_modules\lodash.clonedeep\node_modules\lodash._basecreatecallback\node_modules\lodash.bind\node_modules\lodash._createwrapper\node_modules\lodash._basecreatewrapper\package.json.1152100249
npm ERR! code EINVAL
npm ERR! errno -4071
npm ERR! syscall rename

npm ERR! EINVAL: invalid argument, rename 'D:\local\AppData\npm\node_modules\swagger-tools\node_modules\swagger-converter\node_modules\lodash.clonedeep\node_modules\lodash._basecreatecallback\node_modules\lodash.bind\node_modules\lodash._createwrapper\node_modules\lodash._basecreatewrapper\package.json.1152100249' -> 'D:\local\AppData\npm\node_modules\swagger-tools\node_modules\swagger-converter\node_modules\lodash.clonedeep\node_modules\lodash._basecreatecallback\node_modules\lodash.bind\node_modules\lodash._createwrapper\node_modules\lodash._basecreatewrapper\package.json'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!

npm ERR! Please include the following file with any support request:
npm ERR! D:\home\site\npm-debug.log


Looks like swagger-tools tries to use a command that only works with Linux / OSX systems.

Any help is appreciated!

Answer Source

I try to use a higher node.js version which will include a npm with version grander than 3. And it worked successfully on my side.

Please try to specify a node.js version in your package.json file, E.G.:

"engines": {
"node": ">=5.0.0" 

And then deploy to Azure via Git again.

Any further concern, please feel free to let me know.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download