tfjs icon indicating copy to clipboard operation
tfjs copied to clipboard

tensorflow/tfjs import error in react js

Open RohitGamare opened this issue 5 years ago • 7 comments

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

  • Windows 10
  • TensorFlow.js installed from npm
  • TensorFlow.js version: 3.5.0
  • CUDA/cuDNN version: NO

Describe the problem As I try to import import tensorflow into my component i get the error as such :

./node_modules/@tensorflow/tfjs-core/dist/io/http.js Error: C:\Users\sony\Desktop\rohit\decentragram-master\node_modules@tensorflow\tfjs-core\dist\io\http.js: Expected type "Expression" with option {}, but instead got "SpreadElement". at Array.map () at Array.forEach ()

Provide the exact sequence of commands / steps that you executed before running into the problem const tf = require('@tensorflow/tfjs-node');

Any other info / logs I have installed @tensorflow/tfjs-node in my project but the dependency is not visible in the package.json file

RohitGamare avatar Apr 28 '21 17:04 RohitGamare

@RohitGamare please provide the steps you are following to install and sample code if possible. Thank you

rthadur avatar Apr 28 '21 18:04 rthadur

@RohitGamare please provide the steps you are following to install and sample code if possible. Thank you

npm install @tensorflow/tfjs npm install @tensorflow/tfjs-core npm install @tensorflow/tfjs-node npm install @tensorflow/tfjs-node --unsafe-perm=true --allow-root

above been the commands i tried

RohitGamare avatar Apr 28 '21 19:04 RohitGamare

npm install @tensorflow/tfjs-node will install all the dependencies for tfjs and tfjs core ,also check windows trouble shooting guide here https://github.com/tensorflow/tfjs/blob/master/tfjs-node/WINDOWS_TROUBLESHOOTING.md

rthadur avatar Apr 28 '21 20:04 rthadur

npm install @tensorflow/tfjs-node will install all the dependencies for tfjs and tfjs core ,also check windows trouble shooting guide here https://github.com/tensorflow/tfjs/blob/master/tfjs-node/WINDOWS_TROUBLESHOOTING.md

Thank you for the response

RohitGamare avatar Apr 28 '21 20:04 RohitGamare

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you.

google-ml-butler[bot] avatar May 05 '21 23:05 google-ml-butler[bot]

Closing as stale. Please @mention us if this needs more attention.

google-ml-butler[bot] avatar May 13 '21 00:05 google-ml-butler[bot]

Are you satisfied with the resolution of your issue? Yes No

google-ml-butler[bot] avatar May 13 '21 00:05 google-ml-butler[bot]