Doridian / LuaJS

Lua VM running in Javascript (using emscripten)
Other
55 stars 10 forks source link

npm install && npm run clean && npm run build not working (again) #20

Closed HanzieUWU closed 9 months ago

HanzieUWU commented 9 months ago

Error:


C:\Users\user\Documents\Important\IronBrew_Deobfuscation\NewVersion\Handling\LuaJS>npm install && npm run clean && npm run build

up to date, audited 49 packages in 1s

15 packages are looking for funding run npm fund for details

found 0 vulnerabilities

luajs@1.0.0 clean emmake make clean

make: make clean cd lua && make clean make[1]: Entering directory 'C:/Users/user/Documents/Important/IronBrew_Deobfuscation/NewVersion/Handling/LuaJS/lua' rm -f liblua.a lua lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o ltests.o lua.o lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o lstrlib.o lutf8lib.o loadlib.o lcorolib.o linit.o process_begin: CreateProcess(NULL, rm -f liblua.a lua lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o ltests.o lua.o lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o lstrlib.o lutf8lib.o loadlib.o lcorolib.o linit.o, ...) failed. make (e=2): The system cannot find the file specified. make[1]: [makefile:123: clean] Error 2 make[1]: Leaving directory 'C:/Users/user/Documents/Important/IronBrew_Deobfuscation/NewVersion/Handling/LuaJS/lua' make: [Makefile:18: clean] Error 2 emmake: error: 'make clean' failed (returned 2)


(Im sorry for creating another issue)

Doridian commented 9 months ago

@HanzieUWU This error happens when you try to use emmake on Windows directly. As I said, docker is required (or WSL or a Linux VM) if your machine runs Windows.

HanzieUWU commented 9 months ago

@HanzieUWU This error happens when you try to use emmake on Windows directly. As I said, docker is required (or WSL or a Linux VM) if your machine runs Windows.

What exactly should i run? I just installed docker with choco.

Doridian commented 9 months ago

First, you run (in the LuaJS folder): docker run --rm -it -v "$(pwd):/src" emscripten/emsdk bash Then inside the shell it starts, you run apt update && apt install nodejs and confirm the installation. Then you run npm ci && npm run build inside the shell. Finally, you can run exit which will delete the Docker container you no longer need.

HanzieUWU commented 9 months ago

First, you run (in the LuaJS folder): docker run --rm -it -v "$(pwd):/src" emscripten/emsdk bash Then inside the shell it starts, you run apt update && apt install nodejs and confirm the installation. Then you run npm ci && npm run build inside the shell. Finally, you can run exit which will delete the Docker container you no longer need.

docker run --rm -it -v "$(pwd):/src" emscripten/emsdk bash errors:

C:\Users\user\Documents\Important\IronBrew_Deobfuscation\NewVersion\Handling\LuaJS>docker run --rm -it -v "$(pwd):/src" emscripten/emsdk bash docker: error during connect: this error may indicate that the docker daemon is not running: Post "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/create": open //./pipe/docker_engine: The system cannot find the file specified. See 'docker run --help'.

Doridian commented 9 months ago

@HanzieUWU Make sure you install Docker correctly. No idea about the choco distribution of it. There is Docker Desktop which is an app you can install from Docker directly.

HanzieUWU commented 9 months ago

docker run --rm -it -v "$(pwd):/src" emscripten/emsdk bash

C:\Users\user\Documents\Important\IronBrew_Deobfuscation\NewVersion\Handling\LuaJS>docker run --rm -it -v "$(pwd):/src" emscripten/emsdk bash docker: request returned Internal Server Error for API route and version http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/create, check if the server supports the requested API version. See 'docker run --help'.

I just downloaded docker as well and deleted the choco one. Still the same issue (yes i did restart)

Doridian commented 9 months ago

docker run --rm -it -v "$(pwd):/src" emscripten/emsdk bash

C:\Users\user\Documents\Important\IronBrew_Deobfuscation\NewVersion\Handling\LuaJS>docker run --rm -it -v "$(pwd):/src" emscripten/emsdk bash docker: request returned Internal Server Error for API route and version http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/create, check if the server supports the requested API version. See 'docker run --help'.

I just downloaded docker as well and deleted the choco one. Still the same issue (yes i did restart)

I have not seen that error before, so I am afraid I cannot much help you here. Try starting the Docker Desktop application and seeing if it is happy? It also has a factory reset thing built in maybe?

HanzieUWU commented 9 months ago

docker run --rm -it -v "$(pwd):/src" emscripten/emsdk bash

C:\Users\user\Documents\Important\IronBrew_Deobfuscation\NewVersion\Handling\LuaJS>docker run --rm -it -v "$(pwd):/src" emscripten/emsdk bash docker: request returned Internal Server Error for API route and version http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/create, check if the server supports the requested API version. See 'docker run --help'. I just downloaded docker as well and deleted the choco one. Still the same issue (yes i did restart)

I have not seen that error before, so I am afraid I cannot much help you here. Try starting the Docker Desktop application and seeing if it is happy? It also has a factory reset thing built in maybe?

image_2023-12-28_212203929

Its this one right?

HanzieUWU commented 9 months ago

docker run --rm -it -v "$(pwd):/src" emscripten/emsdk bash

now it errors this C:\Users\user\Documents\Important\IronBrew_Deobfuscation\NewVersion\Handling\LuaJS>docker run --rm -it -v "$(pwd):/src" emscripten/emsdk bash docker: Error response from daemon: create $(pwd): "$(pwd)" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path. See 'docker run --help'.

lol?

Doridian commented 9 months ago

docker run --rm -it -v "$(pwd):/src" emscripten/emsdk bash

now it errors this C:\Users\user\Documents\Important\IronBrew_Deobfuscation\NewVersion\Handling\LuaJS>docker run --rm -it -v "$(pwd):/src" emscripten/emsdk bash docker: Error response from daemon: create $(pwd): "$(pwd)" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path. See 'docker run --help'.

lol?

Make sure you are using PowerShell and not the normal cmd. Otherwise the pwd thing might not work.

HanzieUWU commented 9 months ago

docker run --rm -it -v "$(pwd):/src" emscripten/emsdk bash

now it errors this C:\Users\user\Documents\Important\IronBrew_Deobfuscation\NewVersion\Handling\LuaJS>docker run --rm -it -v "$(pwd):/src" emscripten/emsdk bash docker: Error response from daemon: create $(pwd): "$(pwd)" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path. See 'docker run --help'. lol?

Make sure you are using PowerShell and not the normal cmd. Otherwise the pwd thing might not work.

crap ive been using cmd this entire time lol

HanzieUWU commented 9 months ago

docker run --rm -it -v "$(pwd):/src" emscripten/emsdk bash

now it errors this C:\Users\user\Documents\Important\IronBrew_Deobfuscation\NewVersion\Handling\LuaJS>docker run --rm -it -v "$(pwd):/src" emscripten/emsdk bash docker: Error response from daemon: create $(pwd): "$(pwd)" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path. See 'docker run --help'. lol?

Make sure you are using PowerShell and not the normal cmd. Otherwise the pwd thing might not work.

image_2023-12-28_214144257 Does this take a while or is my pc just dying?

Doridian commented 9 months ago

@HanzieUWU It started the shell, see the line ending with #. There you enter the other commands I mentioned.

HanzieUWU commented 9 months ago

@HanzieUWU It started the shell, see the line ending with #. There you enter the other commands I mentioned.

Donezo! Now it does this:

`> luajs@1.0.0 build

tsc && emmake make install

make: make install sh -e ./patch_lua_makefile.sh : not found_makefile.sh: 2: make: *** [Makefile:27: patch] Error 127 emmake: error: 'make install' failed (returned 2)`

Doridian commented 9 months ago

@HanzieUWU Make sure you checked out the git repository with unix line-endings. I forgot the exact preference but its something like core.autocrlf setting. Furthermore, make sure you checked out the lua submodule.

HanzieUWU commented 9 months ago

unix line-endings

I have no idea what that is- Sorry if im a but dumb ^^, are you talking about the config in the .git folder?

Doridian commented 9 months ago

I have now added an part of the GitHub action that builds the dist folder automatically. This might prove easier for most people. You can click to the "Actions" tab at the top, pick the latest build that was successful and then download the "dist" artifact by clicking on it.