Open shev85 opened 1 month ago
Thanks for reporting the issue, can you try running tldr --clear-cache
then run tldr --update
to see if it fixes the issue?
@kbdharun Hi! I used nvm
to switch node versions 18, 20, 22 and none of them worked. Trying to use tldr --clear-cache
and then tldr --update
is the same issue.
[ttt@Ubuntu24.04 ~ (⎈|default]$ tldr --update
⠼ Updating.../home/ttt/.nvm/versions/node/v22.9.0/lib/node_modules/tldr/node_modules/adm-zip/adm-zip.js:62
throw Utils.Errors.INVALID_FILENAME();
^
Error: ADM-ZIP: Invalid filename
at Object.INVALID_FILENAME (/home/ttt/.nvm/versions/node/v22.9.0/lib/node_modules/tldr/node_modules/adm-zip/util/errors.js:56:16)
at new module.exports (/home/ttt/.nvm/versions/node/v22.9.0/lib/node_modules/tldr/node_modules/adm-zip/adm-zip.js:62:32)
at WriteStream.<anonymous> (/home/ttt/.nvm/versions/node/v22.9.0/lib/node_modules/tldr/lib/remote.js:32:21)
at WriteStream.emit (node:events:531:35)
at finish (node:internal/streams/writable:955:10)
at node:internal/streams/writable:936:13
at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
Node.js v22.9.0
I am unable to repro this. Using Node 20.11.1.
Thanks for reporting the issue, can you try running
tldr --clear-cache
then runtldr --update
to see if it fixes the issue?
Try tldr --clear-cache
then run tldr --update
, dosen't work,either.
Hi, Can you try running npm uninstall -g tldr
then remove cache with npm cache clean --force
then reinstall it using npm install -g tldr
to see if it fixes the issue.
It seems that I have the same problem after a fresh install:
Updating.../usr/lib/node_modules/tldr/node_modules/adm-zip/adm-zip.js:62 throw Utils.Errors.INVALID_FILENAME(); ^
Error: ADM-ZIP: Invalid filename at Object.INVALID_FILENAME (/usr/lib/node_modules/tldr/node_modules/adm-zip/util/errors.js:56:16) at new module.exports (/usr/lib/node_modules/tldr/node_modules/adm-zip/adm-zip.js:62:32) at WriteStream.
(/usr/lib/node_modules/tldr/lib/remote.js:32:21) at WriteStream.emit (node:events:531:35) at finish (node:internal/streams/writable:953:10) at node:internal/streams/writable:934:13 at process.processTicksAndRejections (node:internal/process/task_queues:82:21) Node.js v20.18.0
I have tried all the solutions proposed above (uninstall, clear cache, etc.) but none of them solved the problem.
It seems that I have the same problem after a fresh install:
Updating.../usr/lib/node_modules/tldr/node_modules/adm-zip/adm-zip.js:62 throw Utils.Errors.INVALID_FILENAME(); ^
Error: ADM-ZIP: Invalid filename at Object.INVALID_FILENAME (/usr/lib/node_modules/tldr/node_modules/adm-zip/util/errors.js:56:16) at new module.exports (/usr/lib/node_modules/tldr/node_modules/adm-zip/adm-zip.js:62:32) at WriteStream.
(/usr/lib/node_modules/tldr/lib/remote.js:32:21) at WriteStream.emit (node:events:531:35) at finish (node:internal/streams/writable:953:10) at node:internal/streams/writable:934:13 at process.processTicksAndRejections (node:internal/process/task_queues:82:21) Node.js v20.18.0
I have tried all the solutions proposed above (uninstall, clear cache, etc.) but none of them solved the problem.
Hi, if possible can you clone the repository here with git clone https://github.com/tldr-pages/tldr-node-client && cd tldr-node-client
then install the dependencies with npm install
then try ./bin/tldr --update
to see if it fixes the issue and let me know.
If the issue is due to outdated dependencies, then it will be fixed when I make a new release with the updated deps from the main branch.
I did what you wrote and I got this error message:
Updating.../home/david/Tmp/tldr-node-client/node_modules/adm-zip/zipFile.js:123
if (endOffset == -1) throw Utils.Errors.INVALID_FORMAT();
^
Error: ADM-ZIP: Invalid or unsupported zip format. No END header found
at Object.INVALID_FORMAT (/home/david/Tmp/tldr-node-client/node_modules/adm-zip/util/errors.js:56:16)
at readMainHeader (/home/david/Tmp/tldr-node-client/node_modules/adm-zip/zipFile.js:123:49)
at new module.exports (/home/david/Tmp/tldr-node-client/node_modules/adm-zip/zipFile.js:21:9)
at new module.exports (/home/david/Tmp/tldr-node-client/node_modules/adm-zip/adm-zip.js:67:18)
at WriteStream.<anonymous> (/home/david/Tmp/tldr-node-client/lib/remote.js:32:21)
at WriteStream.emit (node:events:531:35)
at finish (node:internal/streams/writable:953:10)
at node:internal/streams/writable:934:13
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Node.js v20.18.0
I hope this would help you to find what happens.
tldr --update ⠧ Updating.../usr/local/lib/node_modules/tldr/node_modules/adm-zip/adm-zip.js:62 throw Utils.Errors.INVALID_FILENAME(); ^
Error: ADM-ZIP: Invalid filename at Object.INVALID_FILENAME (/usr/local/lib/node_modules/tldr/node_modules/adm-zip/util/errors.js:56:16) at new module.exports (/usr/local/lib/node_modules/tldr/node_modules/adm-zip/adm-zip.js:62:32) at WriteStream. (/usr/local/lib/node_modules/tldr/lib/remote.js:32:21)
at WriteStream.emit (node:events:529:35)
at finish (node:internal/streams/writable:748:10)
at finishMaybe (node:internal/streams/writable:733:9)
at afterWrite (node:internal/streams/writable:507:3)
at onwrite (node:internal/streams/writable:480:7)
at node:internal/fs/streams:465:5
at node:internal/fs/streams:421:7
Node.js v18.19.1
on ubuntu 24.04,dosen’t work,how to fix it?