cesarferreira / drone

:cake: The missing library manager for Android Developers
http://cesarferreira.com/drone/
MIT License
517 stars 30 forks source link

Error when use 'drone' command on mac terminal #9

Closed hendrawd closed 7 years ago

hendrawd commented 7 years ago

I installed drone using the command: npm install -g drone But when i want to use drone, there is an error

/usr/local/lib/node_modules/drone/src/utils/utils.js:19
function findSync(...args) {
                  ^^^

SyntaxError: Unexpected token ...
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/drone/src/utils/git.js:6:15)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
hendrawd commented 7 years ago

It happens on my iMac, but when i tried on my Macbook, it runs perfectly

ferbeb commented 7 years ago

I updated npm from 2.15.5 by running npm install npm@latest -g, which prompted me to update NodeJS the next time I tried to use npm. After downloading 6.3.11 LTS, my npm version is now 5.4.2 and the error is gone.

hendrawd commented 7 years ago

@ferbeb yes, looks like it was because of the compatibility of drone and my previous npm version. The error is gone after i upgrade to 5.4.2

cesarferreira commented 7 years ago

It looks like you guys were using an old version of nodejs where the infinite args (...args) were not available yet. :)