mattkrick / cashay

:moneybag: Relay for the rest of us :moneybag:
MIT License
453 stars 28 forks source link

babel-register/polyfill required for cashay-schema bin #118

Open dustinfarris opened 8 years ago

dustinfarris commented 8 years ago
$ cashay-schema
module.js:457
    throw err;
    ^

Error: Cannot find module 'babel-register'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/dustin/Developer/industrymaps-web/node_modules/cashay/lib/schema/updateSchema.babel.js:4:1)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)

Fixed by installing babel-register and babel-polyfill:

npm i --save-dev babel-register babel-polyfill
mattkrick commented 8 years ago

that's a great catch, thank you! Any reason why you prefer the cli over the webpack plugin?

dustinfarris commented 8 years ago

@mattkrick i'm working on integrating with Ember. No webpack here.

I'm trying to just make it work at the moment, and the cli seemed the most straight-forward, but running into a hangup where it doesn't recognize my browserified import of graphql in schema.js.

Eventually I may write an Ember addon to compile the client-safe schema at build-time using existing Ember hooks (along with any other integration needs); but I am still scratching the surface here.

Thanks for making this btw.

mattkrick commented 8 years ago

Oh interesting! I haven't used it with ember, so your feedback is invaluable.

dustinfarris commented 8 years ago

Definitely glad to give it. I created a new issue to track my thinking/progress: https://github.com/mattkrick/cashay/issues/120