joshblack / react-svg-converter

20 stars 5 forks source link

cli not working #1

Open ccorcos opened 9 years ago

ccorcos commented 9 years ago
react-svg-converter -i ../../../public/icons/share.svg -o share.js                                               
/usr/local/lib/node_modules/react-svg-converter/bin/cli.js:1
(function (exports, require, module, __filename, __dirname) { import cli from 'commander';
                                                              ^^^^^^

SyntaxError: Unexpected reserved word
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:413:25)
    at Module._extensions..js (module.js:452:10)
    at Object.require.extensions.(anonymous function) [as .js] (/usr/local/lib/node_modules/react-svg-converter/node_modules/babel-core/lib/api/register/node.js:214:7)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/react-svg-converter/bin/index.js:4:1)
    at Module._compile (module.js:434:26)
ccorcos commented 9 years ago

looks lik its running node when it should be running babel-node

joshblack commented 9 years ago

The bin should be pointing to https://github.com/joshblack/react-svg-converter/blob/master/bin/index.js which should register babel and then the cli. Will look into this when I get the chance though!