tensorflow/tfjs import error in react js
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 (
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 please provide the steps you are following to install and sample code if possible. Thank you
@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
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
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
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.
Closing as stale. Please @mention us if this needs more attention.