xxgxxg@xxgxxg-All-Series:~/lowcode-ecology$ yarn
yarn install v1.22.19
$ cd demo && yarn
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] 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 An unexpected error occurred: "https://npm.shopee.io/@alilc%2flowcode-datasource-types/-/lowcode-datasource-types-1.1.4.tgz: getaddrinfo ENOTFOUND npm.shopee.io".
info If you think this is a bug, please open a bug report with the information provided in "/home/xxgxxg/lowcode-ecology/demo/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
xxgxxg@xxgxxg-All-Series:~/lowcode-ecology$ yarn yarn install v1.22.19 $ cd demo && yarn yarn install v1.22.19 [1/4] Resolving packages... [2/4] 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 An unexpected error occurred: "https://npm.shopee.io/@alilc%2flowcode-datasource-types/-/lowcode-datasource-types-1.1.4.tgz: getaddrinfo ENOTFOUND npm.shopee.io". info If you think this is a bug, please open a bug report with the information provided in "/home/xxgxxg/lowcode-ecology/demo/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
问ChatGPT说 Chatbot: 当运行 yarn 命令时,它会自动从指定的 registry 下载依赖包,然后将其存储在项目的 node_modules 目录中。如果在下载依赖包时遇到了网络问题,可以通过手动下载依赖包并将其解压到 node_modules 目录来解决问题。 下面是具体的操作步骤:
打开报错信息中的链接(如 https://npm.shopee.io/lodash/-/lodash-4.17.21.tgz),下载被报错的依赖包。如果链接无法访问,可以使用其他源下载相应的依赖包。 将下载好的依赖包保存到项目的根目录下。 进入项目的 node_modules 目录,找到对应的依赖包文件夹。以报错信息中的 lodash 为例,你可以进入 node_modules/lodash 目录。 将下载好的依赖包解压到该目录中,覆盖原有的 package.tgz 文件。以 lodash-4.17.21.tgz 为例,你可以使用以下命令将其解压到 node_modules/lodash 目录中: tar -xzf lodash-4.17.21.tgz --strip-components 1 -C . 解压完成后,你可以在 node_modules/lodash 目录中看到解压出来的文件和目录。 重新运行 yarn 命令,查看是否能够成功安装依赖。如果成功安装,你应该可以在 package.json 文件中看到新安装的依赖。 前端新手请问下,换源挂代理都不行,请问有什么好的办法吗? 我手动安装完lodash后又出现其他依赖 请问还有些简便的办法吗