I've been trying to import "@tensorflow/tfjs" for the last few hours. I have used both methods (import or require),but errors are occurs both times. When I use use import statement then:- Error is:Cannot use import statement outside a module. And when I use require statement then:- Error is=ReferenceError:require is not defined. Javascript files and tensorflow.tfjs file both are in same folder(In vs code).
I am trying to use tensorflow.js in javascript program to learn AI technology.