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

npm Error: Invalid or unsupported zip format. No END header found (Arch Linux) #55

Open
ThornedRose opened this issue May 23, 2024 · 5 comments
Labels
Documentation Improvements to documentation

Comments

@ThornedRose
Copy link

Following the Linux build instructions, I get an error when trying build the latest version. I have 0.18.1 installed previously which built fine when I was last playing (a year ago).

[▓▓▓▓▓▓▓@visas-marr Icarus]$ npm install
npm warn deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm warn deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm warn deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm warn deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm error code 1
npm error path /home/▓▓▓▓▓▓▓/.../Icarus/node_modules/changeexe
npm error command failed
npm error command sh -c node dlResHack
npm error The license of ResourceHacker.exe forbids distribution with this NPM package, so it will be downloaded at this time.
npm error Downloading resource_hacker.zip ...
npm error Download Completed
npm error Extracting resource_hacker.zip ...
npm error /home/▓▓▓▓▓▓▓/.../Icarus/node_modules/adm-zip/zipFile.js:101
npm error         if (!~endOffset) throw new Error(Utils.Errors.INVALID_FORMAT);
npm error                          ^
npm error
npm error Error: Invalid or unsupported zip format. No END header found
npm error     at readMainHeader (/home/▓▓▓▓▓▓▓/.../Icarus/node_modules/adm-zip/zipFile.js:101:32)
npm error     at new module.exports (/home/▓▓▓▓▓▓▓/.../Icarus/node_modules/adm-zip/zipFile.js:19:9)
npm error     at new module.exports (/home/▓▓▓▓▓▓▓/.../Icarus/node_modules/adm-zip/adm-zip.js:62:18)
npm error     at WriteStream.<anonymous> (/home/▓▓▓▓▓▓▓/.../Icarus/node_modules/changeexe/dlResHack.js:19:21)
npm error     at WriteStream.emit (node:events:532:35)
npm error     at finish (node:internal/streams/writable:946:10)
npm error     at node:internal/streams/writable:927:13
npm error     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm error
npm error Node.js v22.2.0
npm error A complete log of this run can be found in: /home/▓▓▓▓▓▓▓/.npm/_logs/2024-05-23T02_10_36_845Z-debug-0.log

My system:
OS: Arch Linux x86_64
Kernel: Linux 6.9.1-arch1-1
Shell: bash 5.2.26
npm: 10.8.0-1
node.js: 22.2.0-1

@darkk99
Copy link

darkk99 commented Jun 21, 2024

Having the same issue here.

capy@fedora:~/Documents/icarus$ npm install
npm warn deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm warn deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm warn deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm warn deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm error code 1
npm error path /var/home/capy/Documents/icarus/node_modules/changeexe
npm error command failed
npm error command sh -c node dlResHack
npm error The license of ResourceHacker.exe forbids distribution with this NPM package, so it will be downloaded at this time.
npm error Downloading resource_hacker.zip ...
npm error Download Completed
npm error Extracting resource_hacker.zip ...
npm error /var/home/capy/Documents/icarus/node_modules/adm-zip/zipFile.js:101
npm error         if (!~endOffset) throw new Error(Utils.Errors.INVALID_FORMAT);
npm error                          ^
npm error
npm error Error: Invalid or unsupported zip format. No END header found
npm error     at readMainHeader (/var/home/capy/Documents/icarus/node_modules/adm-zip/zipFile.js:101:32)
npm error     at new module.exports (/var/home/capy/Documents/icarus/node_modules/adm-zip/zipFile.js:19:9)
npm error     at new module.exports (/var/home/capy/Documents/icarus/node_modules/adm-zip/adm-zip.js:62:18)
npm error     at WriteStream.<anonymous> (/var/home/capy/Documents/icarus/node_modules/changeexe/dlResHack.js:19:21)
npm error     at WriteStream.emit (node:events:532:35)
npm error     at finish (node:internal/streams/writable:947:10)
npm error     at node:internal/streams/writable:928:13
npm error     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm error
npm error Node.js v22.3.0
npm error A complete log of this run can be found in: /home/capy/.npm/_logs/2024-06-21T22_18_26_865Z-debug-0.log

My system:
OS: Fedora Linux 40.20240621.0 (Bazzite GNOME)
Kernel: Linux 6.9.4-201.fsync.fc40.x86_64
Shell: bash 5.2.26
npm: 10.8.1
node.js: v22.3.0

This appears to be an issue with ResourceHack, since it fails to install on its own when trying to install it manually through NPM.

@darkk99
Copy link

darkk99 commented Jun 21, 2024

just tested- as of right now, 0.18.1 also fails to build

@joebywan
Copy link

(On linux mint 21.3)

I believe it's an issue with the 1.0.2 version of changeexe, changing the ./icarus/package.json version in devDependencies for changeexe from 1.0.2 to 1.0.3 let me perform an error free run of npm install.

I don't believe the development build is working though, as say it's serving on 3300, and that it's loaded log files etc, but then when trying to access localhost:3300 in Firefox, it'll show this in the firefox window:
image

Then simultaneously showing the following in the terminal window:
npm start

[email protected] start
npm run dev

[email protected] dev
node src/service/main.js --dev

ICARUS Terminal Service 0.22.0
Loading save game data from /mnt/a0ddbe08-16dd-4eef-b855-ffd7cf80f79c/SteamLibrary/steamapps/compatdata/359320/pfx/drive_c/users/steamuser/Saved Games/Frontier Developments/Elite Dangerous
Listening on port 3300…
Scanned 21 files
Imported 9107 events
(node:29796) [DEP0060] DeprecationWarning: The util._extend API is deprecated. Please use Object.assign() instead.
(Use node --trace-deprecation ... to show where the warning was created)

@joebywan
Copy link

I dug through the woefully out of date http-proxy dependency, and managed to eliminate the util._extend calls, but then that moved to react issues aswell.

I did read that chrome is required, I tested on Chromium aswell, no luck.

Then I figured that potentially due to the age of the dependencies, that we could be using too new a version of node. Unfortunately the package.json doesn't specify a version, so I took a try with v16, then v14, both throwing errors (the same in chromium and firefox).

So either this is borked completely, and requires someone with js/node experience, or the linux compatibility isn't correct anymore.

@iaincollins
Copy link
Owner

Thanks for reporting this, and for folks who dug into it and tried to help out!

Given the package versions are fixed and builds are automated, I suspect all the errors are caused by a Node.js version mismatch. Node.js v14.15.3 (LTS) is what the build for Windows targets. I'll update the build instructions to make this clear.

ICARUS is written to target an older version of Node.js as a concession to primarily targeting Windows (the only platform the game is officially supported on now) - annoyingly there are some tricky compatibility issues with different versions of Node.js for Windows and various modules (I think file watching stopped working reliably in some newer versions, for example).

Several development dependencies like changeexe are only used to build the Windows version and can be stripped entirely. Firefox works fine, but is missing some cosmetic features only possible in some other browsers, errors there also seem to be Node.js version related.

In addition to the docs, I'll see if I can do anything to make this easier.

@iaincollins iaincollins added the Documentation Improvements to documentation label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements to documentation
Projects
None yet
Development

No branches or pull requests

4 participants