I have just started working on node.js and I am unable to import tensorlfow js models into my application. The code I am using is:
import * as cocoSsd from '@tensorflow-models/coco-ssd'
const model = cocoSsd.load();
After running the above code I get the following error:
import * as cocoSsd from '@tensorflow-models/coco-ssd'
^
SyntaxError: Unexpected token *
at Module._compile (internal/modules/cjs/loader.js:721:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)