Apigee Node.js sample "Integrated API Data Service" can't be uploaded with apigeetool deployproxy

StackOverflow https://stackoverflow.com/questions/22104212

  •  18-10-2022
  •  | 
  •  

Pregunta

I created a new Proxy API in Apigee and selected the Node.js sample "integrated API Data Service" application. I downloaded the apiproxy and unzipped it making no further changes. When I tried to upload my changes back to Apigee with the apigeetool I get errors. After some investigation I discovered that the sample app is 11mb when zipped and the error I'm getting is from a HTTP 413 RequestTooLarge error.

$ apigeetool deployproxy -n hybridnode -d apiproxy -o <org> -e test -u <email> -p <password> -z test.zip
[Errno 32] Broken pipe
Import failed to /v1/organizations/deeptin12/apis?action=import&name=hybridnode with status 413:
{"fault":{"faultstring":"Body buffer overflow","detail":{"errorcode":"protocol.http.TooBigBody"}}}

temp.zip is 11mb. It seems that the binary file upload limit is 5mb from the Apigee documentation, but does that limit also apply to apiproxy uploads? Is there a workaround?

I encounter the same problem with 'apigeetool deploynodeproxy'.

My branch with changes to apigeetool (for better error messages) is here.

¿Fue útil?

Solución

I ran npm install to get the dependencies in the package.json so I could run the script locally before uploading (a very important feature IMHO). However, this added argo, express, etc. to the zip which put it over the size limit.

Removing the node_modules directory does fix the 413 error. I will add something to my build toolchain that removes the apigee provided dependencies from the node_modules directory before trying to upload.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top