zotero / citeproc-js-server

Web service to generate citations and bibliographies using citeproc-js
Other
60 stars 39 forks source link

Missing binding.gyp #11

Closed aurimasv closed 9 years ago

aurimasv commented 11 years ago

Sorry if I'm not understanding this correctly, but I'm having trouble npm rebuilding after following the instructions in the README (I realize that this is optional, but still).

First, I was missing node-gyp, which I installed via npm install -g node-gyp (that could probably be added to the README as a prerequisite).

Now, I am getting the following error:

npm ERR! contextify@0.1.2 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! 
npm ERR! Failed at the contextify@0.1.2 install script.
....
npm ERR! System Linux 3.8.0-27-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "rebuild"
npm ERR! cwd /home/aurimas/dev/Zotero/citeproc-node
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.4
npm ERR! code ELIFECYCLE
npm ERR! message contextify@0.1.2 install: `node-gyp rebuild`
npm ERR! message `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! errno {}
....

I read around a bit about node-gyp configure and node-gyp build and it seems to me that node-gyp configure looks for binding.gyp and creates a Makefile, but there is no binding.gyp file.

So am I just doing something wrong or is there in fact something missing?

Edit: also, on Ubuntu at least, one needs to install nodejs instead of node. If node is installed first, which apparently is Amateur Packet Radio Node Program. If node is installed first, you have to use nodejs instead of node to launch the server.

fcheslack commented 10 years ago

Sorry I was ignoring this when you filed it, but I didn't intend to forget it for so long (not that I would have known the issue until I started updating). The lack of gyp came from the included modules being from a time nodejs was using a different system for building modules with native components. The version of jsdom included with the repo is more up to date now, but I'm not sure if it will install/build cleanly on non-linux systems.