question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm i @tensorflow/tfjs-node fails to install

See original GitHub issue
  • System version: Ubuntu MATE 20.04.1 LTS 64-bit
  • Installation source: NPM (npm i @tensorflow/tfjs-node)
  • TensorFlow.js version: 2.8.3-node
  • CUDA/cuDNN version: none

npm i @tensorflow/tfjs-node fails to install tfjs-node. It looks like that it cannot download CPU-linux-2.8.3.tar.gz because it no longer exists on that directory.

Terminal log: `> @tensorflow/tfjs-node@2.8.3 install /opt/lampp/htdocs/node_modules/@tensorflow/tfjs-node

node scripts/install.js

CPU-linux-2.8.3.tar.gz

  • Downloading libtensorflow [==============================] 2340108/bps 100% 0.0s
  • 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 WARN Using request for node-pre-gyp https download node-pre-gyp WARN Tried to download(404): https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v7/2.8.3/CPU-linux-2.8.3.tar.gz node-pre-gyp WARN Pre-built binaries not found for @tensorflow/tfjs-node@2.8.3 and node@14.15.4 (node-v83 ABI, glibc) (falling back to source compile with node-gyp) gyp WARN EACCES current user (“jim”) does not have permission to access the dev dir “/root/.cache/node-gyp/14.15.4” gyp WARN EACCES attempting to reinstall using temporary dev dir “/opt/lampp/htdocs/node_modules/@tensorflow/tfjs-node/.node-gyp” make: *** No rule to make target ‘…/.node-gyp/14.15.4/include/node/common.gypi’, needed by ‘Makefile’. Stop. gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) gyp ERR! System Linux 5.4.0-60-generic gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “build” “–fallback-to-build” “–module=/opt/lampp/htdocs/node_modules/@tensorflow/tfjs-node/lib/napi-v7/tfjs_binding.node” “–module_name=tfjs_binding” “–module_path=/opt/lampp/htdocs/node_modules/@tensorflow/tfjs-node/lib/napi-v7” “–napi_version=7” “–node_abi_napi=napi” “–napi_build_version=7” “–node_napi_label=napi-v7” gyp ERR! cwd /opt/lampp/htdocs/node_modules/@tensorflow/tfjs-node gyp ERR! node -v v14.15.4 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute ‘/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/opt/lampp/htdocs/node_modules/@tensorflow/tfjs-node/lib/napi-v7/tfjs_binding.node --module_name=tfjs_binding --module_path=/opt/lampp/htdocs/node_modules/@tensorflow/tfjs-node/lib/napi-v7 --napi_version=7 --node_abi_napi=napi --napi_build_version=7 --node_napi_label=napi-v7’ (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/opt/lampp/htdocs/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) node-pre-gyp ERR! System Linux 5.4.0-60-generic node-pre-gyp ERR! command “/usr/local/bin/node” “/opt/lampp/htdocs/node_modules/.bin/node-pre-gyp” “install” “–fallback-to-build” node-pre-gyp ERR! cwd /opt/lampp/htdocs/node_modules/@tensorflow/tfjs-node node-pre-gyp ERR! node -v v14.15.4 node-pre-gyp ERR! node-pre-gyp -v v0.14.0 node-pre-gyp ERR! not ok`

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

3reactions
iHildycommented, Jan 13, 2021

I fixed it by doing sudo npm install quick.db --unsafe-perm So try sudo npm install @tensorflow/tfjs-node --unsafe-perm

From this issue

0reactions
jonit-devcommented, Jul 24, 2021

try sudo chown yourlinuxuserhere -R .

and then

yarn install

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to install @tensorflow/tfjs-node with npm
I tried installing 'node-pre-gyp' globally, with and without root permissions but no success. I run on node v12.
Read more >
Installation of tensorflow/tfjs-node fails · Issue #6700 - GitHub
Attempting to install npm install @tensorflow/tfjs-node-gpu fails with multiple errors (see below undr Any other info / logs).
Read more >
@tensorflow/tfjs-node - npm
This repository provides native TensorFlow execution in backend JavaScript applications under the Node.js runtime, accelerated by the ...
Read more >
Unable to install @tensorflow/tfjs-node - General
In Winodws cmd and node-red on IBM cloud. Here is the cmd result: C:\<<path>>\.node-red>npm install @tensorflow/tfjs…
Read more >
Npm install failed - General Discussion - TensorFlow Forum
/Users/svj5706/Documents/Machine Learning/MLKits-master/knn-tf/node_modules/@tensorflow/tfjs-node/scripts/install.js:154 npm ERR! throw new ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found