Error solution for ionic project unable to get local issuer certificate

The ionic project reports Unable to fetch platform [email protected]: Error: unable to get local issuer certificate when adding the Android platform and executing the following command
ionic cordova platform add android

Solution: After searching for information many times, it has not been solved. Finally, execute npm config set strict -ssl false on the command line, and then execute the commands such as packaging Android app and it is successful.

In addition, you can also modify strict-ssl equal to false in the .npmrc file in the main directory , the effect and principle are the same

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324818751&siteId=291194637