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

Module.js throws error on trying to load the .capnp file #34

Open
Pooja71 opened this issue Aug 31, 2017 · 1 comment
Open

Module.js throws error on trying to load the .capnp file #34

Pooja71 opened this issue Aug 31, 2017 · 1 comment

Comments

@Pooja71
Copy link

Pooja71 commented Aug 31, 2017

The following line

var foo = require("./foo.capnp");

throws an Exception/: unexpected Symbol as the first line is the schema ID 0x.....
Am I calling the schema in a wrong way?

Environment Used
node: 6.11.2

@kentonv
Copy link
Member

kentonv commented Sep 5, 2017

Hi Pooja,

Can you provide a more complete test case? Please show us the whole Javascript file and the whole .capnp file, and how you're invoking it on the command line.

It's hard to say what the problem could be without all the info, but here's one possibility: You have to call require("capnp") before you can require a .capnp file.

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