Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tfjs-node Installation Issue #8481

Open
tmeehanpw opened this issue Dec 15, 2024 · 0 comments
Open

tfjs-node Installation Issue #8481

tmeehanpw opened this issue Dec 15, 2024 · 0 comments
Assignees

Comments

@tmeehanpw
Copy link

System information

  • OS Platform and Distribution: macOS Sequoia Version 15.1.1 (24B91)
  • TensorFlow.js installed from (npm or script link): pnpm install @tensorflow/tfjs
  • TensorFlow.js version: 4.22.0

Describe the problem

Unable to install @tensorflow/tfjs-node.

I've tried using different versions of node and have followed some troubleshooting guides. I'm happy to follow up and try whatever suggestions you may have. Please let me know if you need any additional information.

Thank you in advance.

Any other info / logs

❯ pnpm install @tensorflow/tfjs-node

 WARN  9 deprecated subdependencies found: @esbuild-kit/core-utils@3.3.2, @esbuild-kit/esm-loader@2.6.5, are-we-there-yet@2.0.0, gauge@3.0.2, glob@7.2.3, inflight@1.0.6, npmlog@5.0.1, rimraf@2.7.1, rimraf@3.0.2
Packages: +29
+++++++++++++++++++++++++++++
Progress: resolved 989, reused 807, downloaded 0, added 0, done
node_modules/.pnpm/@tensorflow+tfjs-node@4.22.0_seedrandom@3.0.5/node_modules/@tensorflow/tfjs-node: Running install script, failed in 2s
.../node_modules/@tensorflow/tfjs-node install$ node scripts/install.js
│ CPU-darwin-4.22.0.tar.gz
│ * Building TensorFlow Node.js bindings
│ node-pre-gyp install failed with error: Error: Command failed: node-pre-gyp install --fallback-to-build
│ node-pre-gyp info it worked if it ends with ok
│ node-pre-gyp info using node-pre-gyp@1.0.9
│ node-pre-gyp info using node@20.9.0 | darwin | x64
│ node-pre-gyp info check checked for "/Users/x/projects/x/node_modules/.pnpm/@tensorflow+tfjs-node@4.22.0_seedrandom@3.0.5/node_modules/@tensorflow/tfjs-node/lib/napi-v8/tf…
│ node-pre-gyp http GET https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v8/4.22.0/CPU-darwin-4.22.0.tar.gz
│ 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-darwin-4.22.0.tar.gz 
│ node-pre-gyp WARN Pre-built binaries not installable for @tensorflow/tfjs-node@4.22.0 and node@20.9.0 (node-v115 ABI, unknown) (falling back to source compile with node-gyp) 
│ 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-darwin-4.22.0.tar.gz 
│ gyp info it worked if it ends with ok
│ gyp info using node-gyp@10.2.0
│ gyp info using node@20.9.0 | darwin | x64
│ gyp info ok 
│ gyp info it worked if it ends with ok
│ gyp info using node-gyp@10.2.0
│ gyp info using node@20.9.0 | darwin | x64
│ gyp info find Python using Python version 3.10.12 found at "/Users/x/.pyenv/versions/3.10.12/bin/python3"
│ gyp info spawn /Users/x/.pyenv/versions/3.10.12/bin/python3
│ gyp info spawn args [
│ gyp info spawn args '/usr/local/Cellar/pnpm/9.15.0/libexec/lib/node_modules/pnpm/dist/node_modules/node-gyp/gyp/gyp_main.py',
│ gyp info spawn args 'binding.gyp',
│ gyp info spawn args '-f',
│ gyp info spawn args 'make',
│ gyp info spawn args '-I',
│ gyp info spawn args '/Users/x/projects/x/node_modules/.pnpm/@tensorflow+tfjs-node@4.22.0_seedrandom@3.0.5/node_modules/@tensorflow/tfjs-node/build/config.gypi',
│ gyp info spawn args '-I',
│ gyp info spawn args '/usr/local/Cellar/pnpm/9.15.0/libexec/lib/node_modules/pnpm/dist/node_modules/node-gyp/addon.gypi',
│ gyp info spawn args '-I',
│ gyp info spawn args '/Users/x/Library/Caches/node-gyp/20.9.0/include/node/common.gypi',
│ gyp info spawn args '-Dlibrary=shared_library',
│ gyp info spawn args '-Dvisibility=default',
│ gyp info spawn args '-Dnode_root_dir=/Users/x/Library/Caches/node-gyp/20.9.0',
│ gyp info spawn args '-Dnode_gyp_dir=/usr/local/Cellar/pnpm/9.15.0/libexec/lib/node_modules/pnpm/dist/node_modules/node-gyp',
│ gyp info spawn args '-Dnode_lib_file=/Users/x/Library/Caches/node-gyp/20.9.0/<(target_arch)/node.lib',
│ gyp info spawn args '-Dmodule_root_dir=/Users/x/projects/x/node_modules/.pnpm/@tensorflow+tfjs-node@4.22.0_seedrandom@3.0.5/node_modules/@tensorflow/tfjs-node',
│ gyp info spawn args '-Dnode_engine=v8',
│ gyp info spawn args '--depth=.',
│ gyp info spawn args '--no-parallel',
│ gyp info spawn args '--generator-output',
│ gyp info spawn args 'build',
│ gyp info spawn args '-Goutput_dir=.'
│ gyp info spawn args ]
│ gyp info ok 
│ gyp info it worked if it ends with ok
│ gyp info using node-gyp@10.2.0
│ gyp info using node@20.9.0 | darwin | x64
│ gyp info spawn make
│ gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
│ In file included from ../binding/tfjs_backend.cc:18:
│ ../binding/tfjs_backend.h:22:10: fatal error: 'memory' file not found
│    22 | #include <memory>
│       |          ^~~~~~~~
│ 1 error generated.
│ make: *** [Release/obj.target/tfjs_binding/binding/tfjs_backend.o] Error 1
│ gyp ERR! build error 
│ gyp ERR! stack Error: `make` failed with exit code: 2
│ gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/Cellar/pnpm/9.15.0/libexec/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/build.js:216:23)
│ gyp ERR! System Darwin 24.1.0
│ gyp ERR! command "/Users/x/Library/pnpm/nodejs/20.9.0/bin/node" "/usr/local/Cellar/pnpm/9.15.0/libexec/lib/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js" "build" "…
│ gyp ERR! cwd /Users/x/projects/x/node_modules/.pnpm/@tensorflow+tfjs-node@4.22.0_seedrandom@3.0.5/node_modules/@tensorflow/tfjs-node
│ gyp ERR! node -v v20.9.0
│ gyp ERR! node-gyp -v v10.2.0
│ gyp ERR! not ok 
│ node-pre-gyp ERR! build error 
│ node-pre-gyp ERR! stack Error: Failed to execute '/Users/x/Library/pnpm/nodejs/20.9.0/bin/node /usr/local/Cellar/pnpm/9.15.0/libexec/lib/node_modules/pnpm/dist/node_modules/node-…
│ node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/x/projects/x/node_modules/.pnpm/@mapbox+node-pre-gyp@1.0.9/node_modules/@mapbox/node-pre-gyp/lib/util/compi…
│ node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
│ node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1105:16)
│ node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
│ node-pre-gyp ERR! System Darwin 24.1.0
│ node-pre-gyp ERR! command "/Users/x/Library/pnpm/nodejs/20.9.0/bin/node" "/Users/x/projects/x/node_modules/.pnpm/@mapbox+node-pre-gyp@1.0.9/node_modules/@mapbox/node-…
│ node-pre-gyp ERR! cwd /Users/x/projects/x/node_modules/.pnpm/@tensorflow+tfjs-node@4.22.0_seedrandom@3.0.5/node_modules/@tensorflow/tfjs-node
│ node-pre-gyp ERR! node -v v20.9.0
│ node-pre-gyp ERR! node-pre-gyp -v v1.0.9
│ node-pre-gyp ERR! not ok 
└─ Failed in 2s at /Users/x/projects/x/node_modules/.pnpm/@tensorflow+tfjs-node@4.22.0_seedrandom@3.0.5/node_modules/@tensorflow/tfjs-node
 ELIFECYCLE  Command failed with exit code 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants