I was unable to send e-mail through Node.js. So I googled a few pages. And I saw a command and executed it.
The command was npm config set cafile /path/to/your/cert.pem --global
.
Now it ended up giving only one output for all npm commands
Error: EISDIR: illegal operation on a directory, read
I couldn't find .npmrc
file anywhere in the parent directory. But I saw one in the project folder and it was empty.