【待反馈】增加node项目时,无法一键安装依赖
为了能快速了解并处理您的问题,请提供以下基础信息:面板、插件版本:Linux系统版本:已更新最新版
问题描述:node网站,一键安装依赖时一直提示网络问题。服务器为:日本东京
相关截图(日志、错误):正在请求安装.../bin/sh: line 1: {x-http-token:V9Z5**********************lSDn}: command not found正在安装依赖包...yarn install v1.22.22 Resolving packages... Fetching packages...info There appears to be trouble with your network connection. Retrying...info There appears to be trouble with your network connection. Retrying...info There appears to be trouble with your network connection. Retrying...info There appears to be trouble with your network connection. Retrying...error Error: getaddrinfo ENOTFOUND registry.nlark.com at GetAddrInfoReqWrap.onlookup (node:dns:71:26)info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.正在下载依赖包,请稍候...
您好,您遇到的 ENOTFOUND 错误表明 Yarn 无法解析包的来源地址。请确保包的来源地址正确并且可以访问。您可以尝试手动访问包源地址(如 registry.nlark.com)以验证是否可以正常连接。
如果您有dns的话,请尝试关闭dns后再下载
有时,yarn 的缓存可能会导致问题。你可以尝试清除缓存后再运行 yarn install,使用 yarn cache clean 命令。
如果网络问题仍然存在,你可以尝试手动下载依赖包,并将它们放在项目的 node_modules 文件夹中(但这通常不是一个推荐的做法,因为它可能导致依赖版本不一致等问题)。
页:
[1]