laverdet / xxscreeps

Other
71 stars 16 forks source link

unable to build xxscreeps #64

Closed 1nv4l1d-us3r closed 1 year ago

1nv4l1d-us3r commented 1 year ago

i want to install xxscreeps along with xxscreeps-client mod . i tried using (node:20,node:16.3,node:16) docker images to build the package. Every time facing errors while building or importing package.

Using node 16.13.2 & npm 8.1.2

Following script 1

git clone https://github.com/laverdet/xxscreeps.git
cd xxscreeps
npm install
npm run build
npx xxscreeps import

Error while building

> xxscreeps@0.0.6 build
> tsc

root@d8a3cb0d63cf:/xxscreeps/xxscreeps# npx xxscreeps import
`.screepsrc.yaml` not found; using default configuration
FATAL ERROR: v8::FromJust Maybe value is Nothing.

node:internal/process/esm_loader:94
    internalBinding('errors').triggerUncaughtException(
                              ^
SyntaxError [Error]: Unexpected identifier
    at ESMLoader.moduleStrategy (node:internal/modules/esm/translators:139:18)
    at ESMLoader.moduleProvider (node:internal/modules/esm/loader:236:14)
 1: 0xb00e10 node::Abort() [node]
 2: 0xa1823b node::FatalError(char const*, char const*) [node]
 3: 0xceddda v8::Utils::ReportApiFailure(char const*, char const*) [node]
 4: 0xb04c9d node::fs::FileHandle::CloseReq::Resolve() [node]
 5: 0xb04df9  [node]
 6: 0x155607d  [node]
 7: 0x155a806  [node]
 8: 0x156cc74  [node]
 9: 0x155b138 uv_run [node]
10: 0xa3dfe5 node::SpinEventLoop(node::Environment*) [node]
11: 0xbc9842 node::worker::Worker::Run() [node]
12: 0xbc9fd8  [node]
13: 0x7f7b44d2afa3  [/lib/x86_64-linux-gnu/libpthread.so.0]
14: 0x7f7b44c5b4cf clone [/lib/x86_64-linux-gnu/libc.so.6]
Aborted (core dumped)

following other script

mkdir xxscreeps
cd xxscreeps
npm init -y
npm install github:laverdet/xxscreeps github:laverdet/xxscreeps-client
npm explore xxscreeps -- npm run build
npm explore @xxscreeps/client -- npm run build    # Ignore these errors :)
# Save .screepsrc.yaml (see below)
npx xxscreeps import
npx xxscreeps start

Error at

->npm explore xxscreeps -- npm run build

npm explore xxscreeps -- npm run build

> xxscreeps@0.0.6 build
> tsc

src/engine/db/user/badge.ts:43:2 - error TS2740: Type '{ [x: string]: {}; }' is missing the following properties from type 'UserBadge': color1, color2, color3, flip, and 2 more.

43  return badge;
    ~~~~~~

Found 1 error in src/engine/db/user/badge.ts:43

npm ERR! code 2
npm ERR! path /home/meetarmana/xxscreeps/node_modules/xxscreeps
npm ERR! command failed
npm ERR! command sh -c npm run build

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/meetarmana/.npm/_logs/2023-06-27T17_07_57_848Z-debug.log

How can i run the Current version on local server.