FormidableLabs / whackage

Multi-repo development tooling for React Native
MIT License
133 stars 16 forks source link

whack commands not working #10

Closed tnortman closed 6 years ago

tnortman commented 7 years ago

I am getting the same error on every whack command I run; on npm v4.0.3 and nvm v4.3.2

Tims-MacBook-Air:apps TimMobileBytes$ whack --help
/Users/TimMobileBytes/.nvm/versions/node/v4.3.2/lib/node_modules/whackage/src/commands/init.js:32
module.exports = function init({ force }) {
                               ^

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/Users/TimMobileBytes/.nvm/versions/node/v4.3.2/lib/node_modules/whackage/index.js:8:5)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
jevakallio commented 7 years ago

Hi! I think I may have mislabeled the minimum node version. The readme says 4 or above, but looking at node.green the minimum version for the destructuring syntax requires Node >=6.4

For the time being, you can work around by upgrading node to 6.4 (or newer). I'm also happy to take in pull requests that add Node 4 compatibility.

Apologies for this - had not tested the latest version on node 4.

jpdriver commented 6 years ago

related: https://github.com/FormidableLabs/whackage/pull/19

jevakallio commented 6 years ago

Released a Node 4 compatible version: https://github.com/FormidableLabs/whackage/releases/tag/v1.2.0