Giter Club home page Giter Club logo

Comments (7)

popham avatar popham commented on August 11, 2024

The rTypes.js file is generated by the plugin's build process. The error could indicates a problem with path resolution. I can't remember the last time that I used an absolute path to a schema. Try cd /home/adam/ && capnp compile -ojs request.capnp.

Otherwise, I suspect that this is an environment problem. What is going on with npm install -g .../plugin-master? Are you installing from a repository image or something?

from plugin.

popham avatar popham commented on August 11, 2024

I've looked at the npm docs, and I see what you're doing. I publish a post-build snapshot of the capnp-js-plugin repository to npm. The github repository doesn't contain some of the files from this snapshot. Try npm uninstall -g capnp-js-plugin && cd /home/adam/Downloads/plugin-master && npm run build && npm install -g .. This will generate the missing files, including rTypes.js, and reinstall globally.

from plugin.

sirudog avatar sirudog commented on August 11, 2024

I tried to compile it from /home/adam/, same error.

I downloaded the plugin repo and made a necessary change in the c++ source of the compiler (increased arenaSpace from 20 to 21), because I had the same issue as this: https://groups.google.com/forum/#!topic/capnproto/aeSLSP7b-E0

So I tried to install the plugin from my locally changed source, hence the different install command.

from plugin.

sirudog avatar sirudog commented on August 11, 2024

I have just noticed your next comment, that makes sense now, gonna try it now.

from plugin.

sirudog avatar sirudog commented on August 11, 2024

So I finally managed to make it work, with a little workaround.
First I did what you suggested, and after installing the gulp dependencies, "npm run build" started but I had these errors in exportreader and exportbuilder tasks, and finally in readers task. Then I gave up.

err

err2

err3

So I did a trick: I started a "normal" install of the plugin from npm repo, and before the build of the c++ compiler failed (due to arenaSpace too low issue), I have copied the lib folder of the plugin (which already contained the extra files you mentioned). Then I pasted this lib folder to my local downloaded plugin repo (which contained the c++ compiler patch for arenaSpace), and install the plugin from my local repo globally. Then the code generation for my schema worked.

If you know what could go wrong in the gulp build step, please let me know. It would be useful in case I bump into it again in the future. For now I have my compiler working so I can move on with my own prototype.

Thanks a lot for looking into this! Cheers

from plugin.

popham avatar popham commented on August 11, 2024

I blame this mess on my overzealousness. Magically installing the Capnproto compiler is a mistake. Docs should instruct users to install the compiler and refer them to the https://capnproto.org/install.html. A major version update in a week or two will fix this.

from plugin.

sirudog avatar sirudog commented on August 11, 2024

I guess I can close this issue after two years has passed without new info about this. There is a new project filling the gap if anyone is trying to use capnproto in js/ts: https://github.com/jdiaz5513/capnp-ts
Hope this helps

from plugin.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.