Closed mendoitarou closed 1 year ago
Thank you for your issue.
It seems that there is something wrong with unzipper
which enka-network-api uses.
I released version 3.2.2 and got rid of unzipper
.
Please update enka-network-api by running npm i enka-network-api@latest
If you moved the cache directory, you need to update contents with CachedAssetsManager#fetchAllContents.
Thanks! Thanks to you, I no longer get the above error!
However, when I run the following code's, I am getting another error.
const { EnkaClient } = require("enka-network-api");
const enka = new EnkaClient({ showFetchCacheLog: true, cacheDirectory: "./cache",defaultLanguage: "jp"});
enka.cachedAssetsManager.cacheDirectorySetup();
enka.cachedAssetsManager.fetchAllContents();
function weapon_icon_url_get() {
const weapons = enka.getAllWeapons();
weapons.map(async w => {
var name = w.name.get();
var pic_url = w.awakenIcon.url;
console.log(`${name} : ${pic_url}\n`);
});
}
weapon_icon_url_get()
ERROR_LOG
(WeaponName : WeaponIconURL)
狩人の道 : https://enka.network/ui/UI_EquipIcon_Bow_Ayus_Awaken.png
(Example)
Downloading cache.zip...
node:internal/fs/utils:347
throw err;
^
Error: ENOENT: no such file or directory, lstat '/home/~~~/test/node_modules/enka-network-api/cache-downloaded.zip'
at Object.lstatSync (node:fs:1593:3)
at __node_internal_ (node:internal/fs/utils:821:8)
at Object.rmSync (node:fs:1273:13)
at /home/~~~/test/node_modules/enka-network-api/dist/client/CachedAssetsManager.js:476:38
at /home/~~~/test/node_modules/adm-zip/adm-zip.js:705:33
at /home/~~~/test/node_modules/adm-zip/util/utils.js:103:41
at suppressedCallback (node:fs:273:5)
at FSReqCallback.oncomplete (node:fs:198:23) {
errno: -2,
syscall: 'lstat',
code: 'ENOENT',
path: '/home/~~~/test/node_modules/enka-network-api/cache-downloaded.zip'
}
Node.js v18.16.0
Am I doing something wrong? If you don't mind, I would appreciate it if you could tell me what I am doing wrong.
Thank you for reporting.
It's a problem with enka-network-api. I'll fix it in the next version. (Will be v3.2.3)
Thanks for the quick response! Looking forward to seeing the improvements in the update!
I released the patch v3.2.3.
Please update the package with npm i enka-network-api@latest
It worked out fine! Thank you! (issueのクローズは私がするべきですか?)
こちらで閉じておきます
My system environment
OS => Debian GNU/Linux 11 (bullseye) Node.js => v18.16.0 npm => 9.5.1 enka-network-api => 3.2.0
What happened?
When the sample was run, the following error occurred
Am I doing something wrong? Thank you.