I am trying to import uuid like
import { v1 as uuidv1 } from 'uuid';
But I get a syntax error
Cannot use import statement outside a module
because nodejs
doesn't support BABEL
!
try:
const { v1 as uuid} = require('uuid');
If you need BABEL
you must add it and enable it: look this:
https://dev.to/ganeshmani/configuring-babel-for-node-js-express-server-35hp
or google it.