NodeJS UNABLE_TO_VERIFY_LEAF_SIGNATURE

前端 未结 7 1517
鱼传尺愫
鱼传尺愫 2021-02-04 00:36

We\'re trying to use Node.js (and Mocha) as a testing framework to test API calls against an internal server over https. We\'re using the following node modules: Mocha, Restify

7条回答
  •  故里飘歌
    2021-02-04 00:49

    UNABLE_TO_VERIFY_LEAF_SIGNATURE

    The problem is that you are attempting to install a module from a repository with a bad or untrusted SSL[Secure Sockets Layer] certificate. That is not uncommon if you work at a company that self signs its certificates for internal repositories.

    To work around this issue, you can run the following command:

    npm config set strict-ssl false
    

    As a best practice, it is wise to set it back to true afterwords so you do not accidentally install an untrusted module that you actually do not trust.

提交回复
热议问题