Open Nimrod-666 opened 2 years ago
Hello, I can't reproduce your issue. I think you're maybe running an old version of node. (https://www.designcise.com/web/tutorial/how-to-fix-replaceall-is-not-a-function-javascript-error)
It works fine on v17.3.0
(archlinux).
You're right, i updated to a newer version and the issue disappeared, but now i got another one:
Preparing Resources
- Extracting DelverLens Database
- Copying Card Backup Database
- Downloading MTGJSON Database
######################################################################## 100.0%
rm -rf collection/*
rm -rf www/*
/magic-cardtool/main.js:71
card.multiverse = jsondata.multiverseId
^
TypeError: Cannot read properties of undefined (reading 'multiverseId')
at /magic-cardtool/main.js:71:30
at Array.forEach (<anonymous>)
at Object.<anonymous> (/magic-cardtool/main.js:68:7)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47
make: *** [Makefile:14: core] Error 1
I added a debug console log on 'card' before the line where multiverseId is read, and it seems to be this one that crashes the run:
{
id: 59962,
foil: 0,
image: <Buffer ff d8 ff e0 00 10 4a 46 49 46 00 01 01 00 00 01 00 01 00 00 ff e2 02 28 49 43 43 5f 50 52 4f 46 49 4c 45 00 01 01 00 00 02 18 00 00 00 00 02 10 00 00 ... 36728 more bytes>,
quantity: 1,
language: '',
category: 1,
scryfall: '142bbbe1-4446-4d80-b82d-0df8ef17eac1'
}
Hi, i try do do a "make" and i'm getting this error:
I added a console.log(card); before the line for debugging purposes now and i get: