const something = require(something)
works perfectly
But
const {something} = require(something)
gives an error
const {something} = require(something);
^
SyntaxError: Unexpected token {
What you're trying to do is called destructuring on declarations and is available since NodeJS version 6.4+, to be able to use it you either need to upgrade the version of NodeJS you're using, or if you need to use earlier versions, you should use babel to transpile your code.