jsDAV icon indicating copy to clipboard operation
jsDAV copied to clipboard

Node 0.12 compatibility (gnu-tools)

Open FND opened this issue 10 years ago • 5 comments

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)
[...]

FND avatar Feb 23 '15 08:02 FND

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.

mikedeboer avatar Feb 23 '15 12:02 mikedeboer

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.

FND avatar Feb 23 '15 12:02 FND

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.

FND avatar Mar 08 '15 09:03 FND

#122 should fix this problem

paroga avatar Apr 11 '15 08:04 paroga

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.

FND avatar Apr 19 '15 20:04 FND