Comprehensive list of unaccepted node_modules

Not applicable

Hi,

After a lot of troubleshooting I finally got my Node app working with Edge, woohoo! But I have some questions/concerns with how I was able to get it working. I kept getting a 500 error for various node_modules that prevented the app from deploying using the apigeetool. The fix was to manually remove one of the modules for it to work and that does not seem like a sound fix to me. What if we need that module? Is there a list showing modules not accepted by the apigee platform before developing an api in nodejs?

0 4 363
4 REPLIES 4

Hi Ryan,

I have not checked if there is a list with the Apigee Engineering/Product team, but I have never come across this issue. I have been developing Node JS apps using many modules (request, express, jwt-simple, bluebird, async etc. etc.) which are common libraries for creating APIs, and never seen this problem.

It would be interesting to understand if the problem is apigeetool or the specific library. Which libraries were causing you an issue?

Many thanks,

Sean

@Sean Davis Thanks for the reply! I had to remove the following modules in order for the deployment to work: frac, decamelize, and nodemon. The module liftoff raised an error but then I redeployed and it worked, but got the other errors afterwards, weird!

This is beside the point, yet I would like your opinion. I am beginning to feel limited in using apigee. We can't develop how we want it seems because apigee does not support ES6 and I prefer using arrow notation. I am new to this but I feel we are being limited as a developer when we have to conform to how the virtual host tells us how to code. What do you think?

Thanks,

Ryan

nodemon definitely would have caused problems. This library interacts with the filesystem to understand when to restart the node app. If I recall correctly, filesystem IO and some network operations are limited in trireme. (This is the node JS engine used, you can see it here)

If you want opinions on Node development in Apigee, I am your man 🙂

ES6 support has not yet been added to the Trireme engine. Node JS support in Apigee is a very cool way of solving problems that out of the box policies cannot solve. By leveraging third party libraries, you can do tonnes of things that otherwise just wouldn't be possible.

That being said, your API Proxies should still be super light. It is an anti-pattern to introduce business logic or heavy computation into your API proxies from an Architecture point of view. As such, I tried to limit my Node JS usage to core API Management features. Security, mediation and orchestration mainly.

That being said, I think everybody at Apigee and in the community has been amazed by the flexibility that having Node JS has provided. As such, keep your eyes peeled for things that may be coming soon that could allow you to use ES6 and improve the Node JS experience 🙂

@Sean Davis Thanks for the enlightenment! Perhaps you can enlighten me more as deploying apis is pretty new to me. The api management in my experience was always handled by other parties but I think I am missing a fundamental understanding on how apis are deployed. I will give you my scenario and if you have a moment maybe you could help clarify.

I have an api with a ton of node_modules, so I was trying to push that to the virtual host. My question would be then, where does the business logic get pushed to and what is the goal of the api proxy and what gets included and what does not in that proxy?

Thanks!