capnproto / node-capnp

Cap'n Proto bindings for Node.js
BSD 2-Clause "Simplified" License
258 stars 35 forks source link

Can't install node-capnp #41

Open ntaboada opened 6 years ago

ntaboada commented 6 years ago

I have the same log as all the people having the same issue here. I do not understand how can i solve this problem. Can you help me?

Node: v8.4.0 NPM: v5.6.0

I tried both running npm install capnp and cloning/installing project (node 8 branch) with no success.

kentonv commented 6 years ago

I have the same log as all the people having the same issue here.

What log? What people? What issue? There are currently no open issues about being unable to install.

aikikia commented 6 years ago

I have the same problem. Here is the error. ../src/node-capnp/capnp.cc:31:10: fatal error: 'capnp/dynamic.h' file not found

include <capnp/dynamic.h>

     ^~~~~~~~~~~~~~~~~

1 error generated.

My version is Node:v10.1.0

kentonv commented 6 years ago

@aikikia You need to install Cap'n Proto on the machine before you can build the npm module. Instructions here: https://capnproto.org/install.html

calvinleungyk commented 5 years ago

@kentonv seems like I'm able to build it in Node v8.15.0 but not on Node v10.13.0 - I saw that 8.0+ should be supported in capnp 0.3.0+. is Node v10.13.0 a supported version?

kentonv commented 5 years ago

@calvinleungyk I've added a node10 branch which updates the code for the V8 API changes. (Well, sort of. This code really does not follow modern V8 API best practices, but I don't have time to rewrite it right now...)

I tried to publish this version to npm, but when I then tried to install the published version back from npm, the build failed with a strange error:

(...blah blah blah compiler warnings...)
  SOLINK_MODULE(target) Release/obj.target/capnp.node
  COPY Release/capnp.node
make: Leaving directory '/home/kenton/tmp/npm/node_modules/capnp/build'
fs.js:115
    throw err;
    ^

Error: ENOENT: no such file or directory, rename '/home/kenton/tmp/npm/node_modules/capnp/build/Release/capnp.node' -> '/home/kenton/tmp/npm/node_modules/capnp/bin/linux-x64-v8-6.8/capnp.node'
    at Object.renameSync (fs.js:594:3)
    at afterBuild (/home/kenton/tmp/npm/node_modules/capnp/build.js:110:5)
    at ChildProcess.<anonymous> (/home/kenton/tmp/npm/node_modules/capnp/build.js:91:3)
    at ChildProcess.emit (events.js:182:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)

It looks like the build script has bitrotted somehow, but the weird thing is that it works when built locally (before publishing). I don't have time to fix this at the moment. :/