我用角13测试了internal-ip npm软件包,一切都很好,我能够得到正确的IP地址。
然后,我尝试将它集成到我的角11项目中,它一直给我这些错误信息:

发布于 2022-07-28 17:38:36
试着使用下面的
//declare this in the index.html as script src
https://api.ipify.org?format=jsonp&callback=**getMyIP**
//declare this in the index.html as script function
function getMyIP(json) {
localStorage.setItem("<<your key>>", json.ip);
}https://stackoverflow.com/questions/72485463
复制相似问题