codebase-owners icon indicating copy to clipboard operation
codebase-owners copied to clipboard

SyntaxError: Unexpected token

Open ekiefl opened this issue 4 years ago • 1 comments

Installation appears to have worked:

▶▶ npm i -g codebase-owners
npm WARN notice [SECURITY] lodash has the following vulnerability: 1 high. Go here for more details: https://www.npmjs.com/advisories?search=lodash&version=4.17.21 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
/usr/local/bin/codebase-owners -> /usr/local/lib/node_modules/codebase-owners/dist/bin.js
+ [email protected]
added 44 packages in 4.902s

But getting this error:

▶▶ codebase-owners --depth 2
/usr/local/lib/node_modules/codebase-owners/node_modules/locate-path/index.js:41
		} catch {
		        ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:607:28)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/codebase-owners/node_modules/find-up/index.js:3:20)

ekiefl avatar Feb 27 '21 07:02 ekiefl

What version of node are you using? Try using node 12 or higher

remorses avatar Feb 27 '21 10:02 remorses