fix(host): restore image-size 1.x and repair the Host lockfile

The merge of #1118 left package-lock.json with queue 6.0.2 but without its
dependency inherits. The build copies this lockfile next to the generated
package.json, which requests image-size ^1.2.1, so npm reuses the locked
queue, never installs inherits, and Electron fails at startup with
"Cannot find module 'inherits'".

Go back to image-size ^1.2.1 in the Host: it matches package.template.json
and the callback API that main.js uses, which 2.x no longer provides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
DYH1319
2026-11-05 11:19:43 +08:00
parent 05aa92e415
commit 12ca068584
2 changed files with 15 additions and 26 deletions

View File

@@ -12,7 +12,7 @@
"dasherize": "^2.0.0",
"electron-host-hook": "file:./ElectronHostHook",
"electron-updater": "^6.8.9",
"image-size": "^2.0.3",
"image-size": "^1.2.1",
"socket.io": "^4.8.1"
},
"devDependencies": {
@@ -984,15 +984,18 @@
}
},
"node_modules/image-size": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-2.0.3.tgz",
"integrity": "sha512-9BJAtVCBth+76NwqnEfWr3PiRnYhbquk6K/USuQ1GQajz5NgLzO7tNsnoNjHfO7LuftgkBf+CCH6j28hjMbIYQ==",
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-1.2.1.tgz",
"integrity": "sha512-rH+46sQJ2dlwfjfhCyNx5thzrv+dtmBIhPHk0zgRUukHzZ/kRueTJXoYYsclBaKcSMBWuGbOFXtioLpzTb5euw==",
"license": "MIT",
"dependencies": {
"queue": "6.0.2"
},
"bin": {
"image-size": "bin/image-size.js"
},
"engines": {
"node": ">=18"
"node": ">=16.x"
}
},
"node_modules/import-fresh": {
@@ -1022,6 +1025,12 @@
"node": ">=0.8.19"
}
},
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"license": "ISC"
},
"node_modules/is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
@@ -1348,26 +1357,6 @@
"inherits": "~2.0.3"
}
},
"node_modules/quick-lru": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
"integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/resolve-alpn": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz",
"integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==",
"dev": true,
"license": "MIT"
},
"node_modules/resolve-from": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",

View File

@@ -18,7 +18,7 @@
"dependencies": {
"dasherize": "^2.0.0",
"electron-host-hook": "file:./ElectronHostHook",
"image-size": "^2.0.3",
"image-size": "^1.2.1",
"electron-updater": "^6.8.9",
"socket.io": "^4.8.1"
},