Error using ssl-root-cas npm package in a workflow

This topic was automatically generated from Slack. You can find the original thread here.

Nacho Caballero : I was trying to fix this axios error (unable to verify the first certificate) using this answer: node.js - Error: unable to verify the first certificate in nodejs - Stack Overflow But when I ran this line I got an error

const rootCas = require('ssl-root-cas').create();
Cannot find module 'ssl-root-cas'

The module is here: https://www.npmjs.com/package/ssl-root-cas

Dylan Sather (Pipedream) : The npm docs show:

var rootCas = require('ssl-root-cas/latest').create();

If you try that, does that work?

Nacho Caballero : I also tried that, same result

Dylan Sather (Pipedream) : can you share your workflow with dylan@pipedream.com? I’m not seeing the same error

Nacho Caballero : Sorry for the trouble, Dylan. It turns out the error appears only if I use rootCas incorrectly in a subsequent step. I think I’ve fixed it. It was just throwing me off because I thought the problem was in the require.

Dylan Sather (Pipedream) : No problem, glad you got it sorted