cozy-labs / cozy-desktop

File Synchronisation for Cozy on Desktop and Laptop
https://cozy-labs.github.io/cozy-desktop/
GNU Affero General Public License v3.0
99 stars 45 forks source link

Install from npm failed on debian jessie #149

Closed brvier closed 8 years ago

brvier commented 8 years ago

Install from npm failed on debian jessie

root@x200:~# npm install cozy-desktop
npm WARN install Couldn't install optional dependency: Unsupported
npm WARN deprecated object-keys@0.2.0: Please update to the latest object-keys

> leveldown@0.10.5 install /root/node_modules/leveldown
> node-gyp rebuild

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 4.2.0-0.bpo.1-amd64
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/node_modules/leveldown
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm WARN install:leveldown@0.10.5 leveldown@0.10.5 install: `node-gyp rebuild`
npm WARN install:leveldown@0.10.5 Exit status 1
/root
├── bluebird@1.2.4 
├─┬ chokidar@0.12.5 
│ ├── async-each@0.1.6 
│ └── readdirp@1.3.0 
├── commander@2.3.0 
├── crypto@0.0.3 
├─┬ del@0.1.3 
│ ├─┬ each-async@1.1.1 
│ │ ├── onetime@1.0.0 
│ │ └── set-immediate-shim@1.0.1 
│ ├─┬ globby@0.1.1 
│ │ ├── array-differ@0.1.0 
│ │ ├─┬ array-union@0.1.0 
│ │ │ └── array-uniq@0.1.1 
│ │ ├── async@0.9.2 
│ │ └─┬ glob@4.5.3 
│ │   ├─┬ inflight@1.0.4 
│ │   │ └── wrappy@1.0.1 
│ │   ├─┬ minimatch@2.0.10 
│ │   │ └─┬ brace-expansion@1.1.1 
│ │   │   ├── balanced-match@0.2.1 
│ │   │   └── concat-map@0.0.1 
│ │   └── once@1.3.3 
│ ├── is-path-cwd@1.0.0 
│ └─┬ is-path-in-cwd@1.0.0 
│   └─┬ is-path-inside@1.0.0 
│     └── path-is-inside@1.0.1 
├── double-ended-queue@2.0.0-0 
├─┬ express@4.13.3 
│ ├─┬ accepts@1.2.13 
│ │ ├─┬ mime-types@2.1.7 
│ │ │ └── mime-db@1.19.0 
│ │ └── negotiator@0.5.3 
│ ├── array-flatten@1.1.1 
│ ├── content-disposition@0.5.0 
│ ├── content-type@1.0.1 
│ ├── cookie@0.1.3 
│ ├── cookie-signature@1.0.6 
│ ├─┬ debug@2.2.0 
│ │ └── ms@0.7.1 
│ ├── depd@1.0.1 
│ ├── escape-html@1.0.2 
│ ├── etag@1.7.0 
│ ├─┬ finalhandler@0.4.0 
│ │ └── unpipe@1.0.0 
│ ├── fresh@0.3.0 
│ ├── merge-descriptors@1.0.0 
│ ├── methods@1.1.1 
│ ├─┬ on-finished@2.3.0 
│ │ └── ee-first@1.1.1 
│ ├── parseurl@1.3.0 
│ ├── path-to-regexp@0.1.7 
│ ├─┬ proxy-addr@1.0.8 
│ │ ├── forwarded@0.1.0 
│ │ └── ipaddr.js@1.0.1 
│ ├── qs@4.0.0 
│ ├── range-parser@1.0.3 
│ ├─┬ send@0.13.0 
│ │ ├── destroy@1.0.3 
│ │ ├── http-errors@1.3.1 
│ │ ├── mime@1.3.4 
│ │ └── statuses@1.2.1 
│ ├── serve-static@1.10.0 
│ ├── type-is@1.6.9 
│ ├── utils-merge@1.0.0 
│ └── vary@1.0.1 
├─┬ fs-extra@0.11.0 
│ ├── jsonfile@2.2.3 
│ ├─┬ mkdirp@0.5.0 
│ │ └── minimist@0.0.8 
│ ├── ncp@0.6.0 
│ └── rimraf@2.2.8 
├─┬ level-js@2.2.2 
│ ├─┬ abstract-leveldown@0.12.4 
│ │ └── xtend@3.0.0 
│ ├── idb-wrapper@1.6.1 
│ ├── isbuffer@0.0.0 
│ ├── ltgt@1.2.0 
│ └── typedarray-to-buffer@1.0.4 
├─┬ level-sublevel@5.2.3 
│ ├── level-fix-range@2.0.0 
│ ├── level-hooks@4.5.0 
│ ├── string-range@1.2.2 
│ └─┬ xtend@2.0.6 
│   ├── is-object@0.1.2 
│   └─┬ object-keys@0.2.0 
│     ├── foreach@2.0.5 
│     ├── indexof@0.0.1 
│     └── is@0.2.7 
├─┬ levelup@0.18.6 
│ ├── bl@0.8.2 
│ ├── deferred-leveldown@0.2.0 
│ ├── errno@0.1.4 
│ ├── prr@0.0.0 
│ ├── semver@2.3.2 
│ └── xtend@3.0.0 
├─┬ localstorage-down@0.6.3 
│ ├─┬ abstract-leveldown@0.12.3 
│ │ └── xtend@3.0.0 
│ ├── argsarray@0.0.1 
│ ├── d64@1.0.0 
│ └── tiny-queue@0.2.0 
├─┬ memdown@1.1.0 
│ ├─┬ abstract-leveldown@2.4.1 
│ │ └── xtend@4.0.1 
│ ├── functional-red-black-tree@1.0.1 
│ ├── inherits@2.0.1 
│ └── ltgt@1.0.2 
├── moment@2.8.3 
├─┬ node-notifier@4.0.2 
│ ├── clone@0.1.19 
│ ├── growly@1.2.0 
│ ├── semver@4.3.6 
│ ├── shellwords@0.1.0 
│ └─┬ which@1.2.0 
│   └─┬ is-absolute@0.1.7 
│     └── is-relative@0.1.3 
├── open@0.0.5 
├── path-extra@0.2.1 
├─┬ ping@0.1.9 
│ └── q@1.4.1 
├─┬ pouchdb-express-router@0.0.2 
│ ├── bluebird@2.3.11 
│ ├─┬ body-parser@1.9.3 
│ │ ├── bytes@1.0.0 
│ │ ├── iconv-lite@0.4.5 
│ │ ├── media-typer@0.3.0 
│ │ ├─┬ on-finished@2.1.1 
│ │ │ └── ee-first@1.1.0 
│ │ ├── qs@2.3.3 
│ │ ├── raw-body@1.3.1 
│ │ └─┬ type-is@1.5.7 
│ │   └─┬ mime-types@2.0.14 
│ │     └── mime-db@1.12.0 
│ ├─┬ express@4.10.8 
│ │ ├─┬ accepts@1.1.4 
│ │ │ ├─┬ mime-types@2.0.14 
│ │ │ │ └── mime-db@1.12.0 
│ │ │ └── negotiator@0.4.9 
│ │ ├── cookie@0.1.2 
│ │ ├── cookie-signature@1.0.5 
│ │ ├─┬ debug@2.1.3 
│ │ │ └── ms@0.7.0 
│ │ ├── escape-html@1.0.1 
│ │ ├─┬ etag@1.5.1 
│ │ │ └── crc@3.2.1 
│ │ ├── finalhandler@0.3.3 
│ │ ├── fresh@0.2.4 
│ │ ├── merge-descriptors@0.0.2 
│ │ ├─┬ on-finished@2.2.1 
│ │ │ └── ee-first@1.1.0 
│ │ ├── path-to-regexp@0.1.3 
│ │ ├── qs@2.3.3 
│ │ ├─┬ send@0.10.1 
│ │ │ ├── ms@0.6.2 
│ │ │ └── on-finished@2.1.1 
│ │ ├── serve-static@1.7.2 
│ │ └── type-is@1.5.7 
│ ├── extend@2.0.1 
│ ├─┬ multiparty@4.0.0 
│ │ └─┬ fd-slicer@0.3.2 
│ │   └── pend@1.1.3 
│ ├─┬ nodemon@1.2.1 
│ │ ├── minimatch@0.3.0 
│ │ ├─┬ ps-tree@0.0.3 
│ │ │ └─┬ event-stream@0.5.3 
│ │ │   └─┬ optimist@0.2.8 
│ │ │     └── wordwrap@0.0.3 
│ │ └─┬ update-notifier@0.1.10 
│ │   ├─┬ chalk@0.4.0 
│ │   │ ├── ansi-styles@1.0.0 
│ │   │ ├── has-color@0.1.7 
│ │   │ └── strip-ansi@0.1.1 
│ │   ├─┬ configstore@0.3.2 
│ │   │ ├── graceful-fs@3.0.8 
│ │   │ ├─┬ js-yaml@3.4.5 
│ │   │ │ ├─┬ argparse@1.0.3 
│ │   │ │ │ ├── lodash@3.10.1 
│ │   │ │ │ └── sprintf-js@1.0.3 
│ │   │ │ └── esprima@2.7.0 
│ │   │ ├── object-assign@2.1.1 
│ │   │ ├─┬ osenv@0.1.3 
│ │   │ │ ├── os-homedir@1.0.1 
│ │   │ │ └── os-tmpdir@1.0.1 
│ │   │ ├── user-home@1.1.1 
│ │   │ ├── uuid@2.0.1 
│ │   │ └── xdg-basedir@1.0.1 
│ │   ├─┬ request@2.40.0 
│ │   │ ├── hawk@1.1.1 
│ │   │ ├── mime-types@1.0.2 
│ │   │ ├── qs@1.0.2 
│ │   │ ├── stringstream@0.0.5 
│ │   │ └── tunnel-agent@0.4.1 
│ │   └── semver@2.3.2 
│ └─┬ raw-body@1.3.4 
│   └── iconv-lite@0.4.8 
├─┬ pouchdb-mapreduce@2.3.2 
│ ├─┬ es3ify@0.1.4 
│ │ ├── esprima-fb@3001.1.0-dev-harmony-fb 
│ │ ├─┬ jstransform@3.0.0 
│ │ │ ├── base62@0.1.1 
│ │ │ └─┬ source-map@0.1.31 
│ │ │   └── amdefine@1.0.0 
│ │ └── through@2.3.8 
│ ├─┬ lie@2.9.1 
│ │ ├─┬ immediate@3.0.5 
│ │ │ └─┬ unreachable-branch-transform@0.3.0 
│ │ │   └─┬ through2@0.6.5 
│ │ │     └── xtend@4.0.1 
│ │ ├─┬ inline-process-browser@1.0.0 
│ │ │ ├─┬ falafel@1.2.0 
│ │ │ │ ├── acorn@1.2.2 
│ │ │ │ └── object-keys@1.0.9 
│ │ │ └─┬ through2@0.6.5 
│ │ │   └── xtend@4.0.1 
│ │ └─┬ unreachable-branch-transform@0.2.3 
│ │   ├── esmangle-evaluator@1.0.0 
│ │   ├─┬ recast@0.10.39 
│ │   │ ├── ast-types@0.8.12 
│ │   │ ├── esprima-fb@15001.1001.0-dev-harmony-fb 
│ │   │ ├── private@0.1.6 
│ │   │ └── source-map@0.5.3 
│ │   └─┬ through2@0.6.5 
│ │     └── xtend@4.0.1 
│ ├── pouchdb-collate@1.2.0 
│ ├── pouchdb-extend@0.1.2 
│ ├── pouchdb-upsert@1.1.3 
│ └── spark-md5@0.0.5 
├── printit@0.1.4 
├── process@0.7.0 
├── progress@1.1.8 
├── punycode@1.3.2 
├─┬ read@1.0.5 
│ └── mute-stream@0.0.5 
├─┬ readdirp@1.2.0 
│ ├── graceful-fs@2.0.3 
│ ├─┬ minimatch@0.2.14 
│ │ ├── lru-cache@2.7.2 
│ │ └── sigmund@1.0.1 
│ └─┬ readable-stream@1.0.33 
│   ├── core-util-is@1.0.2 
│   ├── isarray@0.0.1 
│   └── string_decoder@0.10.31 
├─┬ request-json@0.4.12 
│ └─┬ request@2.34.0 
│   ├── aws-sign2@0.5.0 
│   ├── forever-agent@0.5.2 
│   ├─┬ hawk@1.0.0 
│   │ ├── boom@0.4.2 
│   │ ├── cryptiles@0.2.2 
│   │ ├── hoek@0.9.1 
│   │ └── sntp@0.2.4 
│   ├─┬ http-signature@0.10.1 
│   │ ├── asn1@0.1.11 
│   │ ├── assert-plus@0.1.5 
│   │ └── ctype@0.5.3 
│   ├── json-stringify-safe@5.0.1 
│   ├── node-uuid@1.4.1 
│   ├── oauth-sign@0.3.0 
│   ├── qs@0.6.6 
│   ├── tough-cookie@2.2.1 
│   └── tunnel-agent@0.3.0 
├─┬ request-json-light@0.5.11 
│ ├─┬ form-data@0.1.4 
│ │ └─┬ combined-stream@0.0.7 
│ │   └── delayed-stream@0.0.5 
│ └── mime@1.2.11 
├─┬ through2@0.4.2 
│ └─┬ xtend@2.1.2 
│   └── object-keys@0.4.0 
├─┬ touch@0.0.3 
│ └─┬ nopt@1.0.10 
│   └── abbrev@1.0.7 
├── vuvuzela@1.0.1 
└── wrench@1.5.8 

npm WARN ENOENT ENOENT, open '/root/package.json'
npm WARN EPACKAGEJSON root No description
npm WARN EPACKAGEJSON root No repository field.
npm WARN EPACKAGEJSON root No README data
npm WARN EPACKAGEJSON root No license field.
root@x200:~# 

So it s look like that s a leveldown packaging error.

nono commented 8 years ago

The version published on npm is old. The dependencies in the npm world moves fast, and I'm doing a lot of refactoring and bug fixes currently. Can you try to clone the git repository and do a npm install from here?

nono commented 8 years ago

And node 0.12.2 is not common. How do you have installed it? On debian/ubuntu, it is still node 0.10, and when using sources or packages, it is often more recent versions (0.12.7 or .8 for the 0.12 branch).

brvier commented 8 years ago

Dont remenber how i installed it ... probably from nodesource for Atom.

So i come back to the one available in Jessie.

# npm install -g cozy-labs/cozy-desktop
npm WARN install Couldn't install optional dependency: Unsupported
loadDep:har-validator → a ▐ ╢█████████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:sntp → 304        ▐ ╢█████████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine hoek@2.16.3: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"3.4.1"})
WARN engine boom@2.10.1: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"3.4.1"})
npm ERR! Linux 4.2.0-0.bpo.1-amd64
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "cozy-labs/cozy-desktop"
npm ERR! node v0.10.29
npm ERR! npm  v3.4.1
npm ERR! path /usr/local/lib/node_modules/cozy-desktop/bin/cli.js
npm ERR! code ENOENT
npm ERR! errno 34

npm ERR! enoent ENOENT, chmod '/usr/local/lib/node_modules/cozy-desktop/bin/cli.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /home/khertan/Projects/ForRunners/npm-debug.log
brvier commented 8 years ago

and yes i need 0.12 at least for ionic :p

nono commented 8 years ago

You can use node 0.12, but you should install a more recent version of it.

Cozy-desktop is coded in coffeescript, and the compiled JS files are not versioned in the repository. Npm seems to not appreciate that. Can you clone the repository with git and do a npm install from here?

brvier commented 8 years ago

Same error from git ... even with a more recent release of node :

root@x200:/home/khertan/Téléchargements/cozy-desktop# npm install -g
npm WARN lifecycle cozy-desktop@0.5.0~prepublish: cannot run in wd %s %s (wd=%s) cozy-desktop@0.5.0 gulp build /home/khertan/Téléchargements/cozy-desktop
npm WARN install Couldn't install optional dependency: Unsupported
npm ERR! Linux 4.2.0-0.bpo.1-amd64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g"
npm ERR! node v5.1.0
npm ERR! npm  v3.4.1
npm ERR! path /usr/local/lib/node_modules/cozy-desktop/bin/cli.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/cozy-desktop/bin/cli.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /home/khertan/Téléchargements/cozy-desktop/npm-debug.log
brvier commented 8 years ago

Installing with npm install (without g seems to works) from the git folder seems to works ...

nono commented 8 years ago

Good! Now, you can run npm run build to compile the JS files. Then, you should make a backup of your data (cozy-desktop is still experimental and losing data can happen).

After that:

bin/cli.js add-remote-cozy https://url.of.my.cozy/ devicename /sync/directory
bin/cli.js pull

The files on the cozy should be available in your /sync/directory. You'll have to wait to have synchronization in both way. I'm still coding it ;-)

brvier commented 8 years ago

Thx for help i ll be able to play with it and see where i could help.