I'm getting these npm errors while trying to install @tensorflow/tfjs-node

未关闭
#8,740 4 条评论 1 个 reaction 已指派 1 人 在 GitHub 查看

@Varun-S10 已经在做这个了。

开始于 2026年8月12日。

评估

这个 Issue 还没有评估数据。

描述

stat:awaiting tensorflower type:build/install type:support

Project Deps

  • OS Platform and Distribution: windows 11:
  • TensorFlow.js version: v4.22.0

"dependencies": {
"@getbrevo/brevo": "^5.0.4",
"@hookform/resolvers": "^5.2.2",
"@ip1sms/is-disposable-phone-number": "^1.2.0",
"@isdisposable/js": "^1.0.7",
"@ngrok/ngrok": "^1.7.0",
"@prisma/client": "6.19",
"@tanstack/react-query": "^5.100.11",
"@tanstack/react-table": "^8.21.3",
"@tensorflow/tfjs": "^4.22.0",
"@upstash/redis": "^1.38.0",
"apexcharts": "^5.15.2",
"axios": "^1.18.0",
"bcryptjs": "^3.0.3",
"blurhash": "^2.0.5",
"body-parser": "^2.3.0",
"canvas-confetti": "^1.9.4",
"cloudinary": "^2.10.0",
"cookie-parser": "^1.4.7",
"cors": "^2.8.6",
"country-state-city": "^3.2.1",
"date-fns": "^4.4.0",
"dompurify": "^3.4.12",
}

node version: v24.12.0
python version: 3.14-6

** logs**
dondo@HTNX MINGW64 /c/projects/zobar (main)
$ npm install @tensorflow/tfjs-node
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]
npm warn deprecated [email protected]: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]
npm error code 1
npm error path C:\projects\zobar\node_modules@tensorflow\tfjs-node
npm error command failed
npm error command C:\Windows\system32\cmd.exe /d /s /c node scripts/install.js
npm error CPU-windows-4.22.0.zip
npm error https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-windows-x86_64-2.9.1.zip
npm error node-pre-gyp install failed with error: Error: Command failed: node-pre-gyp install --fallback-to-build
npm error node-pre-gyp info it worked if it ends with ok
npm error node-pre-gyp info using [email protected]
npm error node-pre-gyp info using [email protected] | win32 | x64
npm error node-pre-gyp info check checked for "C:\projects\zobar\node_modules@tensorflow\tfjs-node\lib\napi-v8\tfjs_binding.node" (not found)
npm error node-pre-gyp http GET https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v8/4.22.0/CPU-windows-4.22.0.zip
npm error node-pre-gyp ERR! install response status 404 Not Found on https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v8/4.22.0/CPU-windows-4.22.0.zip
npm error node-pre-gyp WARN Pre-built binaries not installable for @tensorflow/[email protected] and [email protected] (node-v137 ABI, unknown) (falling back to source compile with node-gyp)
npm error node-pre-gyp WARN Hit error response status 404 Not Found on https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v8/4.22.0/CPU-windows-4.22.0.zip
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | win32 | x64
npm error gyp info ok
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | win32 | x64
npm error gyp info find Python using Python version 3.14.6 found at "C:\Users\dondo\AppData\Local\Python\pythoncore-3.14-64\python.exe"
npm error gyp ERR! find VS
npm error gyp ERR! find VS msvs_version not set from command line or npm config
npm error gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm error gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details.
npm error gyp ERR! find VS
npm error gyp ERR! find VS Failure details: undefined
npm error gyp ERR! find VS unknown version "undefined" found at "C:\Program Files\Microsoft Visual Studio\18\Enterprise"
npm error gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm error gyp ERR! find VS not looking for VS2017 as it is only supported up to Node.js 21
npm error gyp ERR! find VS not looking for VS2017 as it is only supported up to Node.js 21
npm error gyp ERR! find VS not looking for VS2017 as it is only supported up to Node.js 21
npm error gyp ERR! find VS not looking for VS2015 as it is only supported up to Node.js 18
npm error gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm error gyp ERR! find VS
npm error gyp ERR! find VS **************************************************************
npm error gyp ERR! find VS You need to install the latest version of Visual Studio
npm error gyp ERR! find VS including the "Desktop development with C++" workload.
npm error gyp ERR! find VS For more information consult the documentation at:
npm error gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm error gyp ERR! find VS **************************************************************
npm error gyp ERR! find VS
npm error gyp ERR! configure error
npm error gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm error gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:118:11)
npm error gyp ERR! stack at VisualStudioFinder.findVisualStudio (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:17)
npm error gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
npm error gyp ERR! stack at async createBuildDir (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:112:18)
npm error gyp ERR! stack at async run (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js:81:18)
npm error gyp ERR! System Windows_NT 10.0.22621
npm error gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\projects\zobar\node_modules\@tensorflow\tfjs-node\lib\napi-v8\tfjs_binding.node" "--module_name=tfjs_binding" "--module_path=C:\projects\zobar\node_modules\@tensorflow\tfjs-node\lib\napi-v8" "--napi_version=10" "--node_abi_napi=napi" "--napi_build_version=8" "--node_napi_label=napi-v8"
npm error gyp ERR! cwd C:\projects\zobar\node_modules@tensorflow\tfjs-node
npm error gyp ERR! node -v v24.12.0
npm error gyp ERR! node-gyp -v v11.4.2
npm error gyp ERR! not ok
npm error node-pre-gyp ERR! build error
npm error node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\projects\zobar\node_modules@tensorflow\tfjs-node\lib\napi-v8\tfjs_binding.node --module_name=tfjs_binding --module_path=C:\projects\zobar\node_modules@tensorflow\tfjs-node\lib\napi-v8 --napi_version=10 --node_abi_napi=napi --napi_build_version=8 --node_napi_label=napi-v8' (1)
npm error node-pre-gyp ERR! stack at ChildProcess. (C:\projects\zobar\node_modules@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
npm error node-pre-gyp ERR! stack at ChildProcess.emit (node:events:508:28)
npm error node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1101:16)
npm error node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm error node-pre-gyp ERR! System Windows_NT 10.0.22621
npm error node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\projects\zobar\node_modules\@mapbox\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
npm error node-pre-gyp ERR! cwd C:\projects\zobar\node_modules@tensorflow\tfjs-node
npm error node-pre-gyp ERR! node -v v24.12.0
npm error node-pre-gyp ERR! node-pre-gyp -v v1.0.9
npm error node-pre-gyp ERR! not ok
npm error * Downloading libtensorflow
npm error
npm error * Building TensorFlow Node.js bindings
npm error A complete log of this run can be found in: C:\Users\dondo\AppData\Local\npm-cache_logs\2026-08-10T07_24_30_278Z-debug-0.log

主要语言
TypeScript
星标
19.2k
派生
2k
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

tensorflow/tfjs 的其他 Issue

查看 tensorflow/tfjs 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。