[{"data":1,"prerenderedAt":128},["ShallowReactive",2],{"content:\u002Fposts\u002F2024\u002Fnuxt3-server-error":3,"surround:\u002Fposts\u002F2024\u002Fnuxt3-server-error":117},{"id":4,"title":5,"body":6,"canonical":92,"categories":93,"date":95,"description":96,"draft":97,"extension":98,"image":99,"meta":100,"navigation":101,"path":102,"permalink":92,"readingTime":103,"recommend":92,"references":108,"seo":112,"sitemap":113,"stem":114,"tags":115,"type":92,"updated":95,"__hash__":116},"content\u002Fposts\u002F2024\u002Fnuxt3-server-error.md","Nuxt报错解决",{"type":7,"value":8,"toc":84},"minimark",[9,14,18,21,32,45,63],[10,11,13],"h2",{"id":12},"nuxt-error-error-hostnameip-does-not-match-certificates-altnames","nuxt error Error: Hostname\u002FIP does not match certificate's altnames",[15,16,17],"p",{},"在 nuxt 项目中使用\u002Fserver 中对接口进行转发，接口中的地址使用是和后端同一内网的地址，所以是一个 ip 地址，在近期更新中遇到页面中数据缺失，查看 pm2 日志发现报错：",[15,19,20],{},"cause: Error: Hostname\u002FIP does not match certificate's altnames: IP: 192.168.xx.xxx is not in the cert's list:",[15,22,23,24],{},"解决方案如下：\n",[25,26,27,28],"strong",{},"在环境变量中添加 ",[29,30,31],"code",{"code":31},"NODE_TLS_REJECT_UNAUTHORIZED: 0",[15,33,34,35,38,39,42,43],{},"由于生产环境中是以 pm2 启动，更改其配置文件",[29,36,37],{"code":37},"ecosystem.config.js","，在 ",[29,40,41],{"code":41},"env_production"," 字段添加 ",[29,44,31],{"code":31},[10,46,48,52,53,52,56,52,59,62],{"id":47},"nuxt-request-error-unhandled-500-cannot-find-package-deep-pick-omit-imported-from",[49,50,51],"span",{},"nuxt"," ",[49,54,55],{},"request error",[49,57,58],{},"unhandled",[49,60,61],{},"500"," Cannot find package 'deep-pick-omit' imported from",[64,65,66,70],"ol",{},[67,68,69],"li",{},"node版本需要高于16.20.x",[67,71,72,73,76,77,80,81],{},"不要使用",[29,74,75],{"code":75},"cnpm","，想要加速下载可以在 ",[29,78,79],{"code":79},".npmrc"," 中配置 ",[29,82,83],{"code":83},"registry=https:\u002F\u002Fregistry.npmmirror.com\u002F",{"title":85,"searchDepth":86,"depth":86,"links":87},"",4,[88,90],{"id":12,"depth":89,"text":13},2,{"id":47,"depth":89,"text":91},"nuxt request error unhandled 500 Cannot find package 'deep-pick-omit' imported from",null,[94],"代码","2024-09-09 15:33:19","Nuxt 报错解决",false,"md","https:\u002F\u002Fbitmc.uno\u002Fpicgo\u002F679ad7be69f3c-78.webp",{},true,"\u002Fposts\u002F2024\u002Fnuxt3-server-error",{"text":104,"minutes":105,"time":106,"words":107},"1 min read",0.82,49200,164,[109],{"title":110,"link":111},"官方文档地址","https:\u002F\u002Fnuxt.com\u002Fdocs\u002Fapi\u002Futils\u002Fdollarfetch",{"title":5,"description":96},{"loc":102},"posts\u002F2024\u002Fnuxt3-server-error",[],"GhLfXSfzeqs52G2rfmzk-OkOf9Cvifh5vE1T4_DepXA",[118,123],{"title":119,"path":120,"stem":121,"date":122,"type":92,"children":-1},"发布订阅模式","\u002Fposts\u002F2024\u002Fevent-bus","posts\u002F2024\u002Fevent-bus","2024-08-16 23:50:01",{"title":124,"path":125,"stem":126,"date":127,"type":92,"children":-1},"node-简易洋葱模型实现","\u002Fposts\u002F2024\u002Fnode-simple-onion-model-implementation","posts\u002F2024\u002Fnode-simple-onion-model-implementation","2024-10-07 15:15:22",1789642591601]