node-gyp keep downloading header even there is cache
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- linux, nodejs
- 领域
- build-system, tooling
调研方向
先从 node-gyp v10.0.1 的安装流程以及 /home/node-py/.cache/node-gyp/20.11.1 中显示的缓存目录开始,然后使用 Node v20.11.1 和缓存的 headers 压缩包重现离线构建。完成的标准是 node-gyp 能识别缓存的 headers,并且不会请求 https://nodejs.org/download/release/v20.11.1/node-v20.11.1-headers.tar.gz。
由索引模型根据 Issue 内容生成。
描述
I am trying to install renovate which it require node-gyp but when it try to install it keep try to download the header from the internet. But I am trying to run this where there is not access to internet and trying to achieve by caching the header file. Is there anyway I can do that? I have tried to put the header tar in /home/node-py/.cache/node-gyp/20.11.1 as see from the logs but it seems to be not acknowledging that the file already exist.
npm - 10.2.4
node - v20.11.1
Platform: Linux
npm ERR! gyp verb install input version string "20.11.1"
npm ERR! gyp verb install installing version: 20.11.1
npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed
npm ERR! gyp verb install version not already installed, continuing with install 20.11.1
npm ERR! gyp verb ensuring devDir is created /home/node-py/.cache/node-gyp/20.11.1
npm ERR! gyp verb created devDir /home/node-py/.cache/node-gyp/20.11.1
npm ERR! gyp http GET https://nodejs.org/download/release/v20.11.1/node-v20.11.1-headers.tar.gz
npm ERR! gyp WARN install got an error, rolling back install
npm ERR! gyp verb remove using node-gyp dir: /home/node-py/.cache/node-gyp
npm ERR! gyp verb remove removing target version: 20.11.1
npm ERR! gyp verb remove removing development files for version: 20.11.1
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v20.11.1/node-v20.11.1-headers.tar.gz failed, reason: read ECONNRESET
npm ERR! gyp ERR! stack at ClientRequest.<anonymous> (/opt/node/lib/node_modules/renovate/node_modules/minipass-fetch/lib/index.js:130:14)
npm ERR! gyp ERR! stack at ClientRequest.emit (node:events:518:28)
npm ERR! gyp ERR! stack at _destroy (node:_http_client:875:13)
npm ERR! gyp ERR! stack at onSocketNT (node:_http_client:895:5)
npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
npm ERR! gyp ERR! System Linux 5.10.210-201.852.amzn2.x86_64
npm ERR! gyp ERR! command "/opt/node/bin/node" "/opt/node/lib/node_modules/renovate/node_modules/.bin/node-gyp" "rebuild" "--release"
npm ERR! gyp ERR! cwd /opt/node/lib/node_modules/renovate/node_modules/better-sqlite3
npm ERR! gyp ERR! node -v v20.11.1
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok
npm verb exit 1
npm verb unfinished npm timer reify 1710906645648
npm verb unfinished npm timer reify:build 1710906694045
npm verb unfinished npm timer build 1710906694048
npm verb unfinished npm timer build:deps 1710906694049
npm verb unfinished npm timer build:run:install 1710906694137
npm verb unfinished npm timer build:run:install:node_modules/renovate/node_modules/better-sqlite3 1710906694138
npm verb code 1
- 主要语言
- Python
- 星标
- 10.7k
- 派生
- 1.9k
- 平均合并
- 1 天 4 小时
- 30 天内合并 PR
- 5
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nodejs/node-gyp 的其他 Issue
-
dependencies github_actions
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 4/5 3-5 天 新手友好度 48/100
-
难度 4/5 3-5 天 新手友好度 48/100
-
MSYS2
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 48/100
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
stephrobert/dsoxlab#238 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
sublimehq/package_control#1780 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 70/100
nwg-piotr/nwg-displays#145 ·