Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Unable to make uploaded Node.js code work in Apigee Edge that works otherwise locally

Not applicable

Hello

I have a Node.js project that uses nools npm package (a RETE based rules engine). On my local setup, the project works fine and the rules fire as expected when the API is invoked locally but when I used the apigeetool to deploy this project in Apigee Edge, I got some misleading errors by apigeetool which eassentially made me replace keyword "let" with "var" in my .js files. After which the deploy succeeded but when I invoke the deployed API, I get an error in the logs, essentially meaning that some object is undefined in the rule object. It seems Apigee Edge is unable to handle some javascript constructs that might be in nools package..

TypeError: Cannot read property "length" from undefined at /organization/environment/api/node_modules/nools/lib/rule.js:240

Any Thoughts?

0 3 272
3 REPLIES 3