Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dustinfarris opened this issue Sep 12, 2016 · 4 comments
Open

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

dustinfarris opened this issue Sep 12, 2016 · 4 comments

Comments

@dustinfarris
Copy link
Contributor

$ 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
Copy link
Owner

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

@dustinfarris
Copy link
Contributor Author

@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
Copy link
Owner

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

@dustinfarris
Copy link
Contributor Author

Definitely glad to give it. I created a new issue to track my thinking/progress: #120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants