jsDAV
jsDAV copied to clipboard
Node 0.12 compatibility (gnu-tools)
It appears that the gnu-tools package isn't available for Node v0.12 (manually installing it raises ELIFECYCLE
).
While that package is listed as an optional dependency, it seems to be loaded regardless:
#!/usr/bin/env node
var jsDAV = require("jsDAV/lib/jsdav");
jsDAV.createServer({ node: __dirname }, 8000);
$ ./server
[...]
Error: Cannot find module 'gnu-tools'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (.../node_modules/jsDAV/lib/DAV/plugins/codesearch.js:15:16)
[...]
Hmm, you're right. It should be changed to optionally include the module. I'll try to do this soonish, but a PR might be faster.
I'd tried fixing this myself, but couldn't quite figure out where the "codesearch" plugin is activated in the first place. Might give it another try later this week though.
Related: Attempting to install the current HEAD (npm install "git+https://github.com/mikedeboer/jsDAV.git"
- required for ETags; cf. #111) fails due to the time package being outdated. Upgrading to v0.11.1 should (cf. #120) fix this installation issue.
#122 should fix this problem
Thanks @paroga - testing with a local copy that includes both #122 and #123, things seem to be working fine again:
$ ./server
[info] jsDAV cannot load plugin 'codesearch': Cannot find module 'gnu-tools'
[info] jsDAV cannot load plugin 'filelist': Cannot find module 'gnu-tools'
[info] jsDAV cannot load plugin 'filesearch': Cannot find module 'gnu-tools'
[info] jsDAV server running on http://127.0.0.1:8000
It'd be good to get someone else to confirm this, but feel free to close the issue either way.