0

I'm new to TensorFlow.js and just started to follow the tutorial from https://js.tensorflow.org/. I tried to install @tensorflow/tfjs via npm but it doesn't work. Here is the error message I've got:

XXXXXXX$ npm install @tensorflow/tfjs
npm ERR! code E404
npm ERR! 404 Not Found: @tensorflow/tfjs-converter@0.5.7

But if I try to install it again, the error message changed:

XXXXXXX$ npm install @tensorflow/tfjs
npm ERR! code E404
npm ERR! 404 Not Found: @tensorflow/tfjs-core@0.12.11

According to https://www.npmjs.com/package/@tensorflow/tfjs, TensorFlow.js Core & TensorFlow.js Converter should come with TensorFlow.js and I don't need to do any extra installation. Could anyone plz let me know what could be the problem? I tried to run npm install @tensorflow/tfjs@0.XX.X and npm install @tensorflow/tfjs --save but none of them work.

edkeveked
  • 17,989
  • 10
  • 55
  • 93

2 Answers2

0

This seems to be an issue related not to tensorflowJs but to the proxy that you are using in your local network. You can try this answer to make npm work behind a proxy.

edkeveked
  • 17,989
  • 10
  • 55
  • 93
  • Thanks you were right, the issue was about node and npm not the tensorflowJs –  Nov 20 '18 at 13:21
0

Figured out what went wrong, I have 2 different versions of Node.js (one is 8.X.X the other 10.X.X) and they were fighting each other. Tried to update or reinstall via HomeBrew, finally switched Node.js to 10.X.X but my npm version was 5.6.X which didn't support Node 10. Eventually uninstalled npm and node, downloaded the the package from https://nodejs.org/ and installed, run the npm install @tensorflow/tfjs again and everything worked.