I was wondering if the node module “https” is supported.
I’m working on an integration between Freshservice and an old ticketing system, but when I try to do for example a GET request I recieve a “Certificare has expired” Error.
To avoid this error I need an Agent from the “https” module to pass in the call options.
Maybe there’s something wrong in my project structure? I’m working with git, but when I generated the app I had an error telling me that the folder wasn’t empty (because of the initial “.git” and “README.md” files), so I created the “app” folder and generated the custom app inside there.
To rule out any problems with the folder structure, it is recommended that you create the app using the fdk create command, referencing the appropriate template. In your case, the Your First Serverless App template should suffice. You should confirm that you can run this template app locally before copying your changes into this app and then trying to run it again.
the app was already built with the command that you suggested, but I made a new clean project for testing.
It worked locally until I added the module in question, just like the other project.
Here’s the log file fdk.log (22.3 KB)
I tried the same myself now and was able to reproduce the same problem. As you have pointed out, it happens to be something specific to the https package alone.
I have a feeling that the https://www.npmjs.com/package/https?activeTab=code package is broken because installing this package separately using npm install https results in a similar state - a package.json that points at an index.js file which is never installed.
Is it possible for you to consider an alternate dependency that achieves the same outcome?
during my research I didn’t find any other way to get over the “Certificare has expired” Error. I guess the only way is to fix this certificate. Thanks for your assistance!
If you ask me other things I can’t reply until April 26th because tomorrow is holyday in my country.
When using node, one can use core modules (shipped default with node) and npm packages.
For security reasons, Freshworks restricts some of the core modules where https is one of them.
There also exists a https npm on the npm package library that is published 8 years. It is possible you are using it, and since it’s unmaintained is causing these certificate expiration problems for you.
If you purpose of this module is to make API requests, you can try other modules such as superagent or anything in the npm library.