openzim / node-libzim

Libzim binding for Node.js: read/write ZIM files in Javascript
https://www.npmjs.com/package/@openzim/libzim
GNU General Public License v3.0
27 stars 11 forks source link

failed install x86_64 Ubuntu@22.10, npm@9.6.6, node@v19.9.0 #101

Closed Utopiah closed 1 year ago

Utopiah commented 1 year ago

x86_64 Ubuntu@22.10, npm@9.6.6, node@v19.9.0

fabien@fabien-CORSAIR-ONE-i160:~/Prototypes/zim-tests$ ls -a
.  ..
fabien@fabien-CORSAIR-ONE-i160:~/Prototypes/zim-tests$ npm i openzim/libzim
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/fabien/.npm/_cacache/tmp/git-clonepZIFQq/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/fabien/.npm/_cacache/tmp/git-clonepZIFQq/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in: /home/fabien/.npm/_logs/2023-05-07T07_51_19_187Z-debug-0.log
fabien@fabien-CORSAIR-ONE-i160:~/Prototypes/zim-tests$ cat /home/fabien/.npm/_logs/2023-05-07T07_51_19_187Z-debug-0.log
0 verbose cli /usr/bin/node /usr/bin/npm
1 info using npm@9.6.6
2 info using node@v19.9.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/usr/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/home/fabien/Prototypes/zim-tests/.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:/home/fabien/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/usr/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 1ms
15 timing config:load:setEnvs Completed in 0ms
16 timing config:load Completed in 5ms
17 timing npm:load:configload Completed in 5ms
18 timing npm:load:mkdirpcache Completed in 0ms
19 timing npm:load:mkdirplogs Completed in 1ms
20 verbose title npm i openzim/libzim
21 verbose argv "i" "openzim/libzim"
22 timing npm:load:setTitle Completed in 0ms
23 timing config:load:flatten Completed in 2ms
24 timing npm:load:display Completed in 2ms
25 verbose logfile logs-max:10 dir:/home/fabien/.npm/_logs/2023-05-07T07_51_19_187Z-
26 verbose logfile /home/fabien/.npm/_logs/2023-05-07T07_51_19_187Z-debug-0.log
27 timing npm:load:logFile Completed in 6ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 15ms
31 timing config:load:flatten Completed in 0ms
32 timing arborist:ctor Completed in 0ms
33 timing arborist:ctor Completed in 0ms
34 silly logfile start cleaning logs, removing 1 files
35 silly logfile done cleaning log files
36 timing idealTree:init Completed in 9ms
37 timing idealTree Completed in 1286ms
38 timing command:i Completed in 1291ms
39 verbose stack Error: ENOENT: no such file or directory, open '/home/fabien/.npm/_cacache/tmp/git-clonepZIFQq/package.json'
40 verbose cwd /home/fabien/Prototypes/zim-tests
41 verbose Linux 5.19.0-41-generic
42 verbose node v19.9.0
43 verbose npm  v9.6.6
44 error code ENOENT
45 error syscall open
46 error path /home/fabien/.npm/_cacache/tmp/git-clonepZIFQq/package.json
47 error errno -2
48 error enoent ENOENT: no such file or directory, open '/home/fabien/.npm/_cacache/tmp/git-clonepZIFQq/package.json'
49 error enoent This is related to npm not being able to find a file.
49 error enoent
50 verbose exit -2
51 timing npm Completed in 1407ms
52 verbose unfinished npm timer reify 1683445879301
53 verbose unfinished npm timer reify:loadTrees 1683445879304
54 verbose unfinished npm timer idealTree:userRequests 1683445879313
55 verbose code -2
56 error A complete log of this run can be found in: /home/fabien/.npm/_logs/2023-05-07T07_51_19_187Z-debug-0.log
kelson42 commented 1 year ago

@kelvinhammond Do you have an idea what goes wrong here? I have the same behaviour with my Ubuntu 22.04! But if I install the libzim with mwoffliner, all OK!

Utopiah commented 1 year ago

FWIW same result on Ubuntu@23.04 (6.2.0-20-generic) npm@v9.6.6 node@v19.9.0

kelson42 commented 1 year ago

It seems to be a very fundamental problem, npm view does not work at all for example. I'm puzzled.

kelson42 commented 1 year ago

@cscott understood what was going on and I was able to fix this silly error. @Utopiah Thank you for having open this ticket

Utopiah commented 1 year ago

Neat, thanks did work, time to tinker with Zim files now!