Syntax Error on: NPM Start

import app from "./server";
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at Module._compile (internal/modules/cjs/loader.js:895:18)
    at Module._compile (/Volumes/ExtHDD/Toqeer/Learning/MongoDB/mflix/node_modules/pirates/lib/index.js:99:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Object.newLoader [as .js] (/Volumes/ExtHDD/Toqeer/Learning/MongoDB/mflix/node_modules/pirates/lib/index.js:104:7)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/Volumes/ExtHDD/Toqeer/Learning/MongoDB/mflix/index.js:4:28)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
[nodemon] app crashed - waiting for file changes before starting...

Please check this link
May help

“Cannot use import statement outside a module”