screepers / screeps-typescript-starter

Starter kit for TypeScript-based Screeps AI codes.
https://screepers.gitbook.io/screeps-typescript-starter/
The Unlicense
441 stars 318 forks source link

Error due installation #118

Closed DrSnail closed 4 years ago

DrSnail commented 4 years ago

I got an error due installation. How could i resolve this?

gyp ERR! build error gyp ERR! stack Error:C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exefailed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Users\guard\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:210:5) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) gyp ERR! System Windows_NT 10.0.18362 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\guard\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "-C" "native" gyp ERR! cwd C:\Users\guard\AppData\Local\Screeps\scripts\screeps-typescript-starter-master\node_modules\@screeps\driver\native gyp ERR! node -v v12.14.0 gyp ERR! node-gyp -v v5.0.5 gyp ERR! not ok npm WARN optional SKIPPING OPTIONAL DEPENDENCY: weak@1.0.1 (node_modules\weak): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: weak@1.0.1 install:node-gyp rebuild` npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @screeps/driver@3.2.1 install: node-gyp rebuild -C native npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @screeps/driver@3.2.1 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\guard\AppData\Roaming\npm-cache_logs\2020-01-07T06_33_11_817Z-debug.log`

DrSnail commented 4 years ago

Oh. There is one remark left. When i am using rollup -c everything is work okay. main.js file is generated without any issue

GODsaveTHEcat commented 4 years ago

Having the same problem :-( The first error that goes off is

c:\screeps\screeps-typescript-starter\node_modules\nan\nan_implementation_12_inl.h(103): error C2664: "v8::MaybeLocal v8::Function::New(v8::Local,v8::Funct ionCallback,v8::Local,int,v8::ConstructorBehavior,v8::SideEffectType)": nie mozna dokonac konwersji argumentu 1 z "v8::Isolate *" do "v8::Local" (kompilowanie pliku zródlowego ..\src\weakref.cc) [C:\screeps\screeps-typescript-starter\node_modules\weak\build\weakref.vcxproj]

Others also mention weakref.vcxproj

tcdejong commented 4 years ago

@DrSnail read your error carefully: it concludes with npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1. In other words, only a small part of the installation failed.

After downloading and unzipping the kit, try removing "screeps-server-mockup": "^1.4.3", from package.json before running npm install.

@GODsaveTHEcat I do not understand the language those errors are in, but make sure you have the correct version of NodeJS installed. The package mentions version 8 or above, while #114 states Node 12 or above does not work.

GODsaveTHEcat commented 4 years ago

@tcdejong Thanks. I didn't know that I need older NodeJS, I was using version 12. The project installed correctly after I installed NodeJS 10 and Windows 10 SDK 10.0.17763.0 (again the newer 10.0.18362.1 does not work).

pyrodogg commented 4 years ago

The screeps-server-mockup dependency has been removed for now since it doesn't build and appears not to be maintained. This should resolve the installation issue you were experiencing.