feed4rz / node-battlegrounds

PUBG Web API wrapper for nodejs
MIT License
12 stars 3 forks source link

unable to use package #4

Closed avipunes closed 6 years ago

avipunes commented 6 years ago

I created a plain node project, in the index.js file there is only a single line: const battlegrounds = require('battlegrounds') and Im getting the following error:

C:\Program Files (x86)\Ampps\www\opgg\node_modules\battlegrounds\classes\api.js:22 async _req(url) { ^^^^ SyntaxError: Unexpected identifier at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:\Program Files (x86)\Ampps\www\opgg\node_modules\battlegrounds\index.js:1:80)

avipunes commented 6 years ago

solved: Async functions are not supported by Node versions older than version 7.6. had v6.11.0 of node. upgeraded to v10.12.0.