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:
- Created 3 years ago
- Comments:7
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I fixed it by doing
sudo npm install quick.db --unsafe-perm
So trysudo npm install @tensorflow/tfjs-node --unsafe-perm
From this issue
try sudo chown yourlinuxuserhere -R .
and then
yarn install