Comments (7)
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.
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.
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.
I have just noticed your next comment, that makes sense now, gonna try it now.
from plugin.
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.
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.
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.
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)
- Interfaces within a capnproto file prevent generation of structs and enums HOT 1
- Remove unreferenced builder and reader import aliases (file0, ...) HOT 1
- Unions unsupported? HOT 3
- Code generation with syntax errors HOT 4
- Plugin uses master branch of CapnProto lib HOT 1
- Working example HOT 1
- Builder `AnyValue.getAs` doesn't upgrade stale structs HOT 1
- Readme instruction does not work. HOT 2
- v0.4.0 not available via NPM
- Supported Node Version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plugin.