Open Makeshift opened 5 months ago
You're not using the latest v1.5 if it's throwing any error for PullConverter.js
. v1.5(.7) in the releases tab has the converter stored in the SaveTool.json
file in the Data
folder. What you're using is the script version, or a much older version than what's in the release, rather than the actual 1.5.7 release.
The .toString()
error is because the command process converts your argument to an uppercase string, which obviously requires you to actually pass an argument.
Yes, the source version is a bit broken because I modified the way "PullConverter" works (because it no longer downloads anything per 1.5.7) and haven't properly mirrored the changes in this repository. I will properly update this repo with the source of v1.5.7 when the reason I didn't release the code in the first place has passed, so please bear with me until then.
To reiterate: Please download the latest Lantern_v1.5.7_Linux.zip
file from the v1.5 releases page and attempt to run that. If it still throws errors about the missing module, let me know and I will investigate it.
Ah, I think I may have cloned the project after my initial attempt didn't work, and then when I was writing up I had my order mixed up. I assumed that the source would have the latest version, my bad.
With a fresh download, 1.5.7 is missing JSONStream:
22:54:51 [connor@einstein:/tmp/tmp.aJ97VxIagc] $ wget https://github.com/CerisWhite/Lantern/releases/download/v1.5/Lantern_v1.5.7_Linux.zip
--2024-02-05 22:54:59-- https://github.com/CerisWhite/Lantern/releases/download/v1.5/Lantern_v1.5.7_Linux.zip
Resolving github.com (github.com)... 140.82.121.4
...
2024-02-05 22:55:00 (39.8 MB/s) - ‘Lantern_v1.5.7_Linux.zip’ saved [16126659/16126659]
22:55:00 [connor@einstein:/tmp/tmp.aJ97VxIagc] $ unzip Lantern_v1.5.7_Linux.zip
Archive: Lantern_v1.5.7_Linux.zip
creating: Data/
inflating: Data/ItemList.json
inflating: Data/LevelList.json
inflating: Data/PalList.json
creating: Data/palworld-save-tools/
inflating: Data/palworld-save-tools/convert.py
creating: Data/palworld-save-tools/lib/
inflating: Data/palworld-save-tools/lib/archive.py
inflating: Data/palworld-save-tools/lib/gvas.py
inflating: Data/palworld-save-tools/lib/noindent.py
inflating: Data/palworld-save-tools/lib/palsav.py
inflating: Data/palworld-save-tools/lib/paltypes.py
inflating: Data/palworld-save-tools/lib/rawdata.py
extracting: Data/palworld-save-tools/lib/__init__.py
creating: Data/palworld-save-tools/lib/__pycache__/
inflating: Data/palworld-save-tools/lib/__pycache__/archive.cpython-310.pyc
inflating: Data/palworld-save-tools/lib/__pycache__/gvas.cpython-310.pyc
inflating: Data/palworld-save-tools/lib/__pycache__/noindent.cpython-310.pyc
inflating: Data/palworld-save-tools/lib/__pycache__/palsav.cpython-310.pyc
inflating: Data/palworld-save-tools/lib/__pycache__/paltypes.cpython-310.pyc
inflating: Data/palworld-save-tools/lib/__pycache__/rawdata.cpython-310.pyc
inflating: Data/palworld-save-tools/lib/__pycache__/__init__.cpython-310.pyc
inflating: Data/palworld-save-tools/LICENSE
inflating: Data/SaveTool.json
inflating: Data/SkillList.json
inflating: Lantern
22:55:06 [connor@einstein:/tmp/tmp.aJ97VxIagc] $ ls
Data/ Lantern Lantern_v1.5.7_Linux.zip
22:55:19 [connor@einstein:/tmp/tmp.aJ97VxIagc] $ chmod +x Lantern
22:55:22 [connor@einstein:/tmp/tmp.aJ97VxIagc] $ ./Lantern
internal/modules/cjs/loader.js:983
throw err;
^
Error: Cannot find module 'JSONStream'
Require stack:
- /tmp/tmp.aJ97VxIagc/Lantern.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
at Function.Module._load (internal/modules/cjs/loader.js:862:27)
at Module.require (internal/modules/cjs/loader.js:1042:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (/tmp/tmp.aJ97VxIagc/Lantern.js:1:3224)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/tmp/tmp.aJ97VxIagc/Lantern.js' ]
}
Installing it (in the same dir as the binary) does make it work, though:
22:57:18 [connor@einstein:/tmp/tmp.aJ97VxIagc] $ npm install JSONStream
added 3 packages in 1s
23:01:27 [connor@einstein:/tmp/tmp.aJ97VxIagc] 13s $ ./Lantern ExportPals Level.sav
UESave file. Converting to JSON...
Converted Level.sav to JSON.
Pal data exported!
Nice! I've amended my original issue
Upon running the released Linux executable (v1.5 at the time of writing, no arguments), I get a
Error: Cannot find module 'JSONStream'
.After installing JSONStream in the same dir with
npm install JSONStream
, it works as expected.