'Unable to install ESLINT in vscode through npm because of following errors.How to resolve?

command I am using for installation is "npm install @babel/eslint-parser --save-dev" also "sudo npm init @eslint/config".

ERROR that I am getting is below:

import { initializeConfig } from "../lib/init/config-initializer.js";
SyntaxError: Unexpected token {
at Module._compile (internal/modules/cjs/loader.js:723:23)   
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789: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:831:12)   
at startup (internal/bootstrap/node.js:283:19)   
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3) 


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source