Merri / map-generator

Generates random maps for The Settlers II and Return to the Roots
MIT License
6 stars 2 forks source link

Impossible to build anymore #5

Open Celludriel opened 2 years ago

Celludriel commented 2 years ago

Hey,

I've tried a lot of options to try and build this again but it's impossible. The node-gyp on windows keeps failing, it took me a few hours to get all the neccesairy tools correctly installed. But when it starts compiling the C stuff it all breaks.

C:\workspaces\map-generator>npm install
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

> contextify@0.1.15 install C:\workspaces\map-generator\node_modules\contextify
> node-gyp rebuild

C:\workspaces\map-generator\node_modules\contextify>if not defined npm_config_node_gyp (node "C:\Tools\NodeJS\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Tools\NodeJS\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
  contextify.cc
  win_delay_load_hook.cc
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(52,1): error C2660: 'v8::FunctionTemplate::GetFun
ction': function does not take 0 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxpro
j]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(6482,46): message : see declaration of 'v8::Funct
ionTemplate::GetFunction' (compiling source file ..\src\contextify.cc) [C:\workspaces\map-generator\node_modules\contex
tify\build\contextify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(52,1): error C2661: 'v8::Object::Set': no overloa
ded function takes 1 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(62,1): error C2660: 'v8::Value::ToObject': functi
on does not take 0 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(2822,44): message : see declaration of 'v8::Value
::ToObject' (compiling source file ..\src\contextify.cc) [C:\workspaces\map-generator\node_modules\contextify\build\con
textify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(62,55): error C2512: 'ContextifyContext::Contexti
fyContext': no appropriate default constructor available [C:\workspaces\map-generator\node_modules\contextify\build\con
textify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(77,1): error C2660: 'v8::Value::ToString': functi
on does not take 0 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(2810,44): message : see declaration of 'v8::Value
::ToString' (compiling source file ..\src\contextify.cc) [C:\workspaces\map-generator\node_modules\contextify\build\con
textify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(83,1): error C2660: 'v8::Value::ToString': functi
on does not take 0 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(2810,44): message : see declaration of 'v8::Value
::ToString' (compiling source file ..\src\contextify.cc) [C:\workspaces\map-generator\node_modules\contextify\build\con
textify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(83,32): error C2512: 'v8::ScriptOrigin::ScriptOri
gin': no appropriate default constructor available [C:\workspaces\map-generator\node_modules\contextify\build\contextif
y.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(126,1): error C2660: 'v8::FunctionTemplate::GetFu
nction': function does not take 0 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxpr
oj]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(6482,46): message : see declaration of 'v8::Funct
ionTemplate::GetFunction' (compiling source file ..\src\contextify.cc) [C:\workspaces\map-generator\node_modules\contex
tify\build\contextify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(126,1): error C2660: 'Nan::Persistent<v8::Functio
n,v8::NonCopyablePersistentTraits<T>>::Reset': function does not take 1 arguments [C:\workspaces\map-generator\node_mod
ules\contextify\build\contextify.vcxproj]
          with
          [
              T=v8::Function
          ]
C:\workspaces\map-generator\node_modules\nan\nan_persistent_12_inl.h(25,15): message : see declaration of 'Nan::Persist
ent<v8::Function,v8::NonCopyablePersistentTraits<T>>::Reset' [C:\workspaces\map-generator\node_modules\contextify\build
\contextify.vcxproj]
          with
          [
              T=v8::Function
          ] (compiling source file ..\src\contextify.cc)
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(131,1): error C2661: 'v8::Function::NewInstance':
 no overloaded function takes 0 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj
]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(140,16): error C2039: 'SetHiddenPrototype': is no
t a member of 'v8::FunctionTemplate' [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(6461): message : see declaration of 'v8::Function
Template' [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(150,16): error C2039: 'SetAccessCheckCallbacks':
is not a member of 'v8::ObjectTemplate' [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(6754): message : see declaration of 'v8::ObjectTe
mplate' [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(176,1): error C2660: 'v8::Value::ToObject': funct
ion does not take 0 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(2822,44): message : see declaration of 'v8::Value
::ToObject' (compiling source file ..\src\contextify.cc) [C:\workspaces\map-generator\node_modules\contextify\build\con
textify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(182,1): error C2660: 'v8::Object::GetRealNamedPro
perty': function does not take 1 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxpro
j]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(3988,43): message : see declaration of 'v8::Objec
t::GetRealNamedProperty' (compiling source file ..\src\contextify.cc) [C:\workspaces\map-generator\node_modules\context
ify\build\contextify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(192,1): error C2660: 'v8::Value::ToObject': funct
ion does not take 0 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(2822,44): message : see declaration of 'v8::Value
::ToObject' (compiling source file ..\src\contextify.cc) [C:\workspaces\map-generator\node_modules\contextify\build\con
textify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(198,1): error C2661: 'v8::Object::Set': no overlo
aded function takes 2 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(203,1): error C2660: 'v8::Value::ToObject': funct
ion does not take 0 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(2822,44): message : see declaration of 'v8::Value
::ToObject' (compiling source file ..\src\contextify.cc) [C:\workspaces\map-generator\node_modules\contextify\build\con
textify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(209,1): error C2660: 'v8::Object::GetRealNamedPro
perty': function does not take 1 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxpro
j]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(3988,43): message : see declaration of 'v8::Objec
t::GetRealNamedProperty' (compiling source file ..\src\contextify.cc) [C:\workspaces\map-generator\node_modules\context
ify\build\contextify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(210,1): error C2660: 'v8::Object::GetRealNamedPro
perty': function does not take 1 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxpro
j]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(3988,43): message : see declaration of 'v8::Objec
t::GetRealNamedProperty' (compiling source file ..\src\contextify.cc) [C:\workspaces\map-generator\node_modules\context
ify\build\contextify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(218,1): error C2660: 'v8::Value::ToObject': funct
ion does not take 0 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(2822,44): message : see declaration of 'v8::Value
::ToObject' (compiling source file ..\src\contextify.cc) [C:\workspaces\map-generator\node_modules\contextify\build\con
textify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(224,1): error C2661: 'v8::Object::Delete': no ove
rloaded function takes 1 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(229,1): error C2660: 'v8::Value::ToObject': funct
ion does not take 0 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(2822,44): message : see declaration of 'v8::Value
::ToObject' (compiling source file ..\src\contextify.cc) [C:\workspaces\map-generator\node_modules\contextify\build\con
textify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(237,1): error C2661: 'v8::Object::GetPropertyName
s': no overloaded function takes 0 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxp
roj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(277,1): error C2660: 'v8::FunctionTemplate::GetFu
nction': function does not take 0 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxpr
oj]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(6482,46): message : see declaration of 'v8::Funct
ionTemplate::GetFunction' (compiling source file ..\src\contextify.cc) [C:\workspaces\map-generator\node_modules\contex
tify\build\contextify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(277,1): error C2661: 'v8::Object::Set': no overlo
aded function takes 1 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(286,1): error C2660: 'v8::Value::ToString': funct
ion does not take 0 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(2810,44): message : see declaration of 'v8::Value
::ToString' (compiling source file ..\src\contextify.cc) [C:\workspaces\map-generator\node_modules\contextify\build\con
textify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(291,1): error C2660: 'v8::Value::ToString': funct
ion does not take 0 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(2810,44): message : see declaration of 'v8::Value
::ToString' (compiling source file ..\src\contextify.cc) [C:\workspaces\map-generator\node_modules\contextify\build\con
textify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(319,1): error C2660: 'v8::Value::ToObject': funct
ion does not take 0 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(2822,44): message : see declaration of 'v8::Value
::ToObject' (compiling source file ..\src\contextify.cc) [C:\workspaces\map-generator\node_modules\contextify\build\con
textify.vcxproj]
C:\workspaces\map-generator\node_modules\contextify\src\contextify.cc(322,1): error C2660: 'v8::Value::ToObject': funct
ion does not take 0 arguments [C:\workspaces\map-generator\node_modules\contextify\build\contextify.vcxproj]
C:\Users\de_sm\AppData\Local\node-gyp\Cache\14.16.0\include\node\v8.h(2822,44): message : see declaration of 'v8::Value
::ToObject' (compiling source file ..\src\contextify.cc) [C:\workspaces\map-generator\node_modules\contextify\build\con
textify.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Tools\NodeJS\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Windows_NT 10.0.19042
gyp ERR! command "C:\\Tools\\NodeJS\\node.exe" "C:\\Tools\\NodeJS\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\workspaces\map-generator\node_modules\contextify
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@github:pipobscure/fsevents#7dcdf9fa3f8956610fd6f69f72c67bace2de7138 (node_modules\watchify\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@0.2.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! contextify@0.1.15 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.15 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\de_sm\AppData\Roaming\npm-cache\_logs\2022-02-09T19_52_00_072Z-debug.log

is there any tip you can give to get it updated/installed/running again ? I wanted to fix a bug since atm any map generated on

https://settlers2.net/map-generator/ isn't working anymore at least not in the map editor of settlers II 10th anniversary edition.

Merri commented 2 years ago

Hi and thanks for the interest! I recently ported settlers2.net to Astro and at the same time ported map generator code to TypeScript. It should be easier to get the site running in your local with full dev environment, the only gotcha to usual Node project is that it is using pnpm.

You can find the most relevant code at /src/lib

Note: Astro recently switched to Vite from Snowpack, haven't updated yet.

Celludriel commented 2 years ago

Thanks, I'll try to get it running after work, keep up the good work !