Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADM-ZIP Error #8427

Open
vision66 opened this issue Oct 28, 2024 · 1 comment
Open

ADM-ZIP Error #8427

vision66 opened this issue Oct 28, 2024 · 1 comment
Assignees
Labels

Comments

@vision66
Copy link

entry an empty directory, then run in 'Git Bash'

npm init -y
TFJS_NODE_CDN_STORAGE="https://npmmirror.com/mirrors/" npm install @tensorflow/tfjs-node --verbose

get result:

351 verbose Windows_NT 10.0.22631
352 verbose node v18.20.4
353 verbose npm  v10.7.0
354 error code 1
355 error path D:\nodejs\usecase\tensorflow.js\node_modules\@tensorflow\tfjs-node
356 error command failed
357 error command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/install.js
358 error CPU-windows-4.22.0.zip
358 error https://npmmirror.com/mirrors/tensorflow/libtensorflow/libtensorflow-cpu-windows-x86_64-2.9.1.zip
359 error * Downloading libtensorflow
359 error
359 error D:\nodejs\usecase\tensorflow.js\node_modules\adm-zip\util\errors.js:56
359 error         return new Error('ADM-ZIP: ' + message);
359 error                ^
359 error
359 error Error: ADM-ZIP: Invalid or unsupported zip format. No END header found
359 error     at Object.INVALID_FORMAT (D:\nodejs\usecase\tensorflow.js\node_modules\adm-zip\util\errors.js:56:16)
359 error     at readMainHeader (D:\nodejs\usecase\tensorflow.js\node_modules\adm-zip\zipFile.js:123:49)
359 error     at new module.exports (D:\nodejs\usecase\tensorflow.js\node_modules\adm-zip\zipFile.js:21:9)
359 error     at new module.exports (D:\nodejs\usecase\tensorflow.js\node_modules\adm-zip\adm-zip.js:67:18)
359 error     at WriteStream.<anonymous> (D:\nodejs\usecase\tensorflow.js\node_modules\@tensorflow\tfjs-node\scripts\resources.js:72:29)
359 error     at WriteStream.emit (node:events:517:28)
359 error     at emitCloseNT (node:internal/streams/destroy:132:10)
359 error     at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
359 error
359 error Node.js v18.20.4
360 verbose exit 1
361 verbose code 1

test adm-zip, its ok

const zip = require('adm-zip');

const tempFileName = `temp/libtensorflow-cpu-windows-x86_64-2.9.1.zip`
const destPath = `temp/libtensorflow`
const zipFile = new zip(tempFileName);
zipFile.extractAllTo(destPath, true /* overwrite */);

This error should not be related to Python, perhaps it was caused by incomplete download using httpClient in resource.js

@vision66 vision66 added the type:bug Something isn't working label Oct 28, 2024
@shmishra99 shmishra99 self-assigned this Oct 28, 2024
@shmishra99
Copy link
Contributor

HI @vision66 ,

I am able to run the command you have mentioned in my macOS without any issue. Your provided command is generating the package.json file and downloading the @tensorflow/tfjs-node package.
Let me know if I am missing anything.

Thank you!

@shmishra99 shmishra99 added type:support user support questions stat:awaiting response and removed type:bug Something isn't working labels Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants