title: Npm install not installing because of node-gyp
body: <p>I'm trying to install the <code>filepreview</code> module with <code>npm</code>. But it always gives error. Here is the error: </p>
  
  <pre><code>D:\Program Files\nodejs\PalettenzettelGenerator&gt;npm install filepreview
  
  &gt; fibers@1.0.15 install D:\Program Files\nodejs\PalettenzettelGenerator\node_modules\synchronize\node_modules\fibers
  &gt; node build.js || nodejs build.js
  
  
  D:\Program Files\nodejs\PalettenzettelGenerator\node_modules\synchronize\node_modules\fibers&gt;if not defined npm_config_node_gyp (node "D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --release )  else (node "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild --release )
  gyp ERR! UNCAUGHT EXCEPTION
  gyp ERR! stack Error: spawn D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\15.0\Bin\MSBuild.exe ENOENT
  gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
  gyp ERR! stack     at onErrorNT (internal/child_process.js:415:16)
  gyp ERR! stack     at process._tickCallback (internal/process/next_tick.js:63:19)
  gyp ERR! System Windows_NT 10.0.17134
  gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
  gyp ERR! cwd D:\Program Files\nodejs\PalettenzettelGenerator\node_modules\synchronize\node_modules\fibers
  gyp ERR! node -v v10.16.0
  gyp ERR! node-gyp -v v3.8.0
  gyp ERR! This is a bug in `node-gyp`.
  gyp ERR! Try to update node-gyp and file an Issue if it does not help:
  gyp ERR!     &lt;https://github.com/nodejs/node-gyp/issues&gt;
  node-gyp exited with code: 7
  Please make sure you are using a supported platform and node version. If you
  would like to compile fibers on this machine please make sure you have setup your
  build environment--
  Windows + OS X instructions here: https://github.com/nodejs/node-gyp
  Ubuntu users please run: `sudo apt-get install g++ build-essential`
  Alpine users please run: `sudo apk add python make g++`
  'nodejs' is not recognized as an internal or external command,
  operable program or batch file.
  npm WARN PalettenzettelGenerator@1.0.0 No repository field.
  
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! fibers@1.0.15 install: `node build.js || nodejs build.js`
  npm ERR! Exit status 1
  npm ERR!
  npm ERR! Failed at the fibers@1.0.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\ibrahim\AppData\Roaming\npm-cache\_logs\2019-09-02T08_17_55_828Z-debug.log
  </code></pre>
  
  <p>I've searched for it, generally says it's about <code>node-gyp</code>. My node is v10.16.0. I've also installed Python 2.7. My vs version is 2019.</p>
  
  <p>Is it true that it's only about <code>node-gyp</code> module. If so, is there any other solution to preview a file as png in Node.js</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I've uninstalled VS2019 and installed VS2017 Build Tools. But still gives another error:</p>
  
  <pre><code>D:\Program Files\nodejs\PalettenzettelGenerator&gt;npm install filepreview
  
  &gt; fibers@1.0.15 install D:\Program Files\nodejs\PalettenzettelGenerator\node_modules\synchronize\node_modules\fibers
  &gt; node build.js || nodejs build.js
  
  
  D:\Program Files\nodejs\PalettenzettelGenerator\node_modules\synchronize\node_modules\fibers&gt;if not defined npm_config_node_gyp (node "D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --release )  else (node "D:\Program Files\nodejs\node_modules\node-gyp\bin\node-gyp.js" rebuild --release )
  Bu çözümde projeler tek tek derlenir. Paralel bir derlemeyi etkinleştirmek için lütfen "/m" anahtarını ekleyin.
    fibers.cc
    coroutine.cc
    win_delay_load_hook.cc
  d:\program files\nodejs\palettenzettelgenerator\node_modules\synchronize\node_modules\fibers\src\fibers.cc(122): error C2660: 'v8::String::NewFromOneByte': işlev 2 bağımsız değişken almıyor [D:\Program Files\nodejs\PalettenzettelGenerator\node_modules\synchronize\node_modules\
  fibers\build\fibers.vcxproj]
    c:\users\ibrahim\appdata\local\node-gyp\cache\10.16.0\include\node\v8.h(2802): note: 'v8::String::NewFromOneByte' bildirimine bakın (kaynak dosyası derleniyor ..\src\fibers.cc)
  d:\program files\nodejs\palettenzettelgenerator\node_modules\synchronize\node_modules\fibers\src\fibers.cc(126): error C2660: 'v8::String::NewFromOneByte': işlev 2 bağımsız değişken almıyor [D:\Program Files\nodejs\PalettenzettelGenerator\node_modules\synchronize\node_modules\
  fibers\build\fibers.vcxproj]
    c:\users\ibrahim\appdata\local\node-gyp\cache\10.16.0\include\node\v8.h(2802): note: 'v8::String::NewFromOneByte' bildirimine bakın (kaynak dosyası derleniyor ..\src\fibers.cc)
  d:\program files\nodejs\palettenzettelgenerator\node_modules\synchronize\node_modules\fibers\src\fibers.cc(406): warning C4996: 'v8::String::Utf8Value::Utf8Value': kullanım dışı olarak bildirildi [D:\Program Files\nodejs\PalettenzettelGenerator\node_modules\synchronize\node_mo
  dules\fibers\build\fibers.vcxproj]
    c:\users\ibrahim\appdata\local\node-gyp\cache\10.16.0\include\node\v8.h(2891): note: 'v8::String::Utf8Value::Utf8Value' bildirimine bakın
  d:\program files\nodejs\palettenzettelgenerator\node_modules\synchronize\node_modules\fibers\src\fibers.cc(433): error C2661: 'v8::Function::NewInstance': hiçbir aşırı yüklenmiş işlev 2 bağımsız değişken almaz [D:\Program Files\nodejs\PalettenzettelGenerator\node_modules\synch
  ronize\node_modules\fibers\build\fibers.vcxproj]
  d:\program files\nodejs\palettenzettelgenerator\node_modules\synchronize\node_modules\fibers\src\fibers.cc(433): error C2672: 'uni::Return': eşleşen aşırı yüklenmiş işlev bulunamadı [D:\Program Files\nodejs\PalettenzettelGenerator\node_modules\synchronize\node_modules\fibers\b
  uild\fibers.vcxproj]
  d:\program files\nodejs\palettenzettelgenerator\node_modules\synchronize\node_modules\fibers\src\fibers.cc(621): error C2512: 'v8::TryCatch': kullanılabilir uygun varsayılan oluşturucu yok [D:\Program Files\nodejs\PalettenzettelGenerator\node_modules\synchronize\node_modules\f
  ibers\build\fibers.vcxproj]
    c:\users\ibrahim\appdata\local\node-gyp\cache\10.16.0\include\node\v8.h(8529): note: 'v8::TryCatch' bildirimine bakın (kaynak dosyası derleniyor ..\src\fibers.cc)
  d:\program files\nodejs\palettenzettelgenerator\node_modules\synchronize\node_modules\fibers\src\fibers.cc(628): warning C4996: 'v8::Script::Compile': kullanım dışı olarak bildirildi [D:\Program Files\nodejs\PalettenzettelGenerator\node_modules\synchronize\node_modules\fibers\
  build\fibers.vcxproj]
    c:\users\ibrahim\appdata\local\node-gyp\cache\10.16.0\include\node\v8.h(1255): note: 'v8::Script::Compile' bildirimine bakın
  d:\program files\nodejs\palettenzettelgenerator\node_modules\synchronize\node_modules\fibers\src\fibers.cc(643): warning C4996: 'v8::TryCatch::StackTrace': kullanım dışı olarak bildirildi [D:\Program Files\nodejs\PalettenzettelGenerator\node_modules\synchronize\node_modules\fi
  bers\build\fibers.vcxproj]
    c:\users\ibrahim\appdata\local\node-gyp\cache\10.16.0\include\node\v8.h(8593): note: 'v8::TryCatch::StackTrace' bildirimine bakın
  d:\program files\nodejs\palettenzettelgenerator\node_modules\synchronize\node_modules\fibers\src\fibers.cc(741): error C2661: 'v8::Value::ToNumber': hiçbir aşırı yüklenmiş işlev 0 bağımsız değişken almaz [D:\Program Files\nodejs\PalettenzettelGenerator\node_modules\synchronize
  \node_modules\fibers\build\fibers.vcxproj]
  d:\program files\nodejs\palettenzettelgenerator\node_modules\synchronize\node_modules\fibers\src\fibers.cc(793): error C2660: 'v8::Object::SetAccessor': işlev 2 bağımsız değişken almıyor [D:\Program Files\nodejs\PalettenzettelGenerator\node_modules\synchronize\node_modules\fib
  ers\build\fibers.vcxproj]
    c:\users\ibrahim\appdata\local\node-gyp\cache\10.16.0\include\node\v8.h(3348): note: 'v8::Object::SetAccessor' bildirimine bakın (kaynak dosyası derleniyor ..\src\fibers.cc)
  d:\program files\nodejs\palettenzettelgenerator\node_modules\synchronize\node_modules\fibers\src\fibers.cc(794): error C2664: 'v8::Maybe&lt;bool&gt; v8::Object::SetAccessor(v8::Local&lt;v8::Context&gt;,v8::Local&lt;v8::Name&gt;,v8::AccessorNameGetterCallback,v8::AccessorNameSetterCallback,v8::M
  aybeLocal&lt;v8::Value&gt;,v8::AccessControl,v8::PropertyAttribute,v8::SideEffectType)' : 2 bağımsız değişkeni 'uni::FunctionType (__cdecl *)(v8::Local&lt;v8::String&gt;,const uni::GetterCallbackInfo &amp;)' değerinden 'v8::Local&lt;v8::Name&gt;' değerine dönüştürülemez [D:\Program Files\nodejs\Pal
  ettenzettelGenerator\node_modules\synchronize\node_modules\fibers\build\fibers.vcxproj]
    d:\program files\nodejs\palettenzettelgenerator\node_modules\synchronize\node_modules\fibers\src\fibers.cc(794): note: Kaynak türünü hiçbir oluşturucu alamadı veya oluşturucu aşırı yük çözümü belirsizdi
  d:\program files\nodejs\palettenzettelgenerator\node_modules\synchronize\node_modules\fibers\src\fibers.cc(795): error C2660: 'v8::Object::SetAccessor': işlev 2 bağımsız değişken almıyor [D:\Program Files\nodejs\PalettenzettelGenerator\node_modules\synchronize\node_modules\fib
  ers\build\fibers.vcxproj]
    c:\users\ibrahim\appdata\local\node-gyp\cache\10.16.0\include\node\v8.h(3348): note: 'v8::Object::SetAccessor' bildirimine bakın (kaynak dosyası derleniyor ..\src\fibers.cc)
  d:\program files\nodejs\palettenzettelgenerator\node_modules\synchronize\node_modules\fibers\src\coroutine.cc(138): warning C4552: '!': ifade sonucu kullanılmıyor [D:\Program Files\nodejs\PalettenzettelGenerator\node_modules\synchronize\node_modules\fibers\build\fibers.vcxproj
  ]
  gyp ERR! build error
  gyp ERR! stack Error: `D:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
  gyp ERR! stack     at ChildProcess.onExit (D:\Program Files\nodejs\node_modules\node-gyp\lib\build.js:196:23)
  gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
  gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
  gyp ERR! System Windows_NT 10.0.17134
  gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
  gyp ERR! cwd D:\Program Files\nodejs\PalettenzettelGenerator\node_modules\synchronize\node_modules\fibers
  gyp ERR! node -v v10.16.0
  gyp ERR! node-gyp -v v5.0.3
  gyp ERR! not ok
  node-gyp exited with code: 1
  Please make sure you are using a supported platform and node version. If you
  would like to compile fibers on this machine please make sure you have setup your
  build environment--
  Windows + OS X instructions here: https://github.com/nodejs/node-gyp
  Ubuntu users please run: `sudo apt-get install g++ build-essential`
  Alpine users please run: `sudo apk add python make g++`
  'nodejs' is not recognized as an internal or external command,
  operable program or batch file.
  npm WARN PalettenzettelGenerator@1.0.0 No repository field.
  
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! fibers@1.0.15 install: `node build.js || nodejs build.js`
  npm ERR! Exit status 1
  npm ERR!
  npm ERR! Failed at the fibers@1.0.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\ibrahim\AppData\Roaming\npm-cache\_logs\2019-09-02T23_04_29_295Z-debug.log
  </code></pre>