I'm trying to install the filepreview
module with npm
. But it always gives error. Here is the error:
D:Program Files
odejsPalettenzettelGenerator>npm install filepreview
> [email protected] install D:Program Files
odejsPalettenzettelGenerator
ode_modulessynchronize
ode_modulesfibers
> node build.js || nodejs build.js
D:Program Files
odejsPalettenzettelGenerator
ode_modulessynchronize
ode_modulesfibers>if not defined npm_config_node_gyp (node "D:Program Files
odejs
ode_modules
pm
ode_modules
pm-lifecycle
ode-gyp-bin\....
ode_modules
ode-gypin
ode-gyp.js" rebuild --release ) else (node "D:Program Files
odejs
ode_modules
pm
ode_modules
ode-gypin
ode-gyp.js" rebuild --release )
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn D:Program Files (x86)Microsoft Visual Studio2019CommunityMSBuild15.0BinMSBuild.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
odejsPalettenzettelGenerator
ode_modulessynchronize
ode_modulesfibers
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! <https://github.com/nodejs/node-gyp/issues>
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 [email protected] No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node build.js || nodejs build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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:UsersibrahimAppDataRoaming
pm-cache\_logs2019-09-02T08_17_55_828Z-debug.log
I've searched for it, generally says it's about node-gyp
. My node is v10.16.0. I've also installed Python 2.7. My vs version is 2019.
Is it true that it's only about node-gyp
module. If so, is there any other solution to preview a file as png in Node.js
EDIT
I've uninstalled VS2019 and installed VS2017 Build Tools. But still gives another error:
D:Program Files
odejsPalettenzettelGenerator>npm install filepreview
> [email protected] install D:Program Files
odejsPalettenzettelGenerator
ode_modulessynchronize
ode_modulesfibers
> node build.js || nodejs build.js
D:Program Files
odejsPalettenzettelGenerator
ode_modulessynchronize
ode_modulesfibers>if not defined npm_config_node_gyp (node "D:Program Files
odejs
ode_modules
pm
ode_modules
pm-lifecycle
ode-gyp-bin\....
ode_modules
ode-gypin
ode-gyp.js" rebuild --release ) else (node "D:Program Files
odejs
ode_modules
ode-gypin
ode-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
odejspalettenzettelgenerator
ode_modulessynchronize
ode_modulesfiberssrcfibers.cc(122): error C2660: 'v8::String::NewFromOneByte': i?lev 2 ba??ms?z de?i?ken alm?yor [D:Program Files
odejsPalettenzettelGenerator
ode_modulessynchronize
ode_modules
fibersuildfibers.vcxproj]
c:usersibrahimappdatalocal
ode-gypcache10.16.0include
odev8.h(2802): note: 'v8::String::NewFromOneByte' bildirimine bak?n (kaynak dosyas? derleniyor ..srcfibers.cc)
d:program files
odejspalettenzettelgenerator
ode_modulessynchronize
ode_modulesfiberssrcfibers.cc(126): error C2660: 'v8::String::NewFromOneByte': i?lev 2 ba??ms?z de?i?ken alm?yor [D:Program Files
odejsPalettenzettelGenerator
ode_modulessynchronize
ode_modules
fibersuildfibers.vcxproj]
c:usersibrahimappdatalocal
ode-gypcache10.16.0include
odev8.h(2802): note: 'v8::String::NewFromOneByte' bildirimine bak?n (kaynak dosyas? derleniyor ..srcfibers.cc)
d:program files
odejspalettenzettelgenerator
ode_modulessynchronize
ode_modulesfiberssrcfibers.cc(406): warning C4996: 'v8::String::Utf8Value::Utf8Value': kullan?m d??? olarak bildirildi [D:Program Files
odejsPalettenzettelGenerator
ode_modulessynchronize
ode_mo
dulesfibersuildfibers.vcxproj]
c:usersibrahimappdatalocal
ode-gypcache10.16.0include
odev8.h(2891): note: 'v8::String::Utf8Value::Utf8Value' bildirimine bak?n
d:program files
odejspalettenzettelgenerator
ode_modulessynchronize
ode_modulesfiberssrcfibers.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
odejsPalettenzettelGenerator
ode_modulessynch
ronize
ode_modulesfibersuildfibers.vcxproj]
d:program files
odejspalettenzettelgenerator
ode_modulessynchronize
ode_modulesfiberssrcfibers.cc(433): error C2672: 'uni::Return': e?le?en a??r? yüklenmi? i?lev bulunamad? [D:Program Files
odejsPalettenzettelGenerator
ode_modulessynchronize
ode_modulesfibers
uildfibers.vcxproj]
d:program files
odejspalettenzettelgenerator
ode_modulessynchronize
ode_modulesfiberssrcfibers.cc(621): error C2512: 'v8::TryCatch': kullan?labilir uygun varsay?lan olu?turucu yok [D:Program Files
odejsPalettenzettelGenerator
ode_modulessynchronize
ode_modulesf
ibersuildfibers.vcxproj]
c:usersibrahimappdatalocal
ode-gypcache10.16.0include
odev8.h(8529): note: 'v8::TryCatch' bildirimine bak?n (kaynak dosyas? derleniyor ..srcfibers.cc)
d:program files
odejspalettenzettelgenerator
ode_modulessynchronize
ode_modulesfiberssrcfibers.cc(628): warning C4996: 'v8::Script::Compile': kullan?m d??? olarak bildirildi [D:Program Files
odejsPalettenzettelGenerator
ode_modulessynchronize
ode_modulesfibers
buildfibers.vcxproj]
c:usersibrahimappdatalocal
ode-gypcache10.16.0include
odev8.h(1255): note: 'v8::Script::Compile' bildirimine bak?n
d:program files
odejspalettenzettelgenerator
ode_modulessynchronize
ode_modulesfiberssrcfibers.cc(643): warning C4996: 'v8::TryCatch::StackTrace': kullan?m d??? olarak bildirildi [D:Program Files
odejsPalettenzettelGenerator
ode_modulessynchronize
ode_modulesfi
bersuildfibers.vcxproj]
c:usersibrahimappdatalocal
ode-gypcache10.16.0include
odev8.h(8593): note: 'v8::TryCatch::StackTrace' bildirimine bak?n
d:program files
odejspalettenzettelgenerator
ode_modulessynchronize
ode_modulesfiberssrcfibers.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
odejsPalettenzettelGenerator
ode_modulessynchronize
ode_modulesfibersuildfibers.vcxproj]
d:program files
odejspalettenzettelgenerator
ode_modulessynchronize
ode_modulesfiberssrcfibers.cc(793): error C2660: 'v8::Object::SetAccessor': i?lev 2 ba??ms?z de?i?ken alm?yor [D:Program Files
odejsPalettenzettelGenerator
ode_modulessynchronize
ode_modulesfib
ersuildfibers.vcxproj]
c:usersibrahimappdatalocal
ode-gypcache10.16.0include
odev8.h(3348): note: 'v8::Object::SetAccessor' bildirimine bak?n (kaynak dosyas? derleniyor ..srcfibers.cc)
d:program files
odejspalettenzettelgenerator
ode_modulessynchronize
ode_modulesfiberssrcfibers.cc(794): error C2664: 'v8::Maybe<bool> v8::Object::SetAccessor(v8::Local<v8::Context>,v8::Local<v8::Name>,v8::AccessorNameGetterCallback,v8::AccessorNameSetterCallback,v8::M
aybeLocal<v8::Value>,v8::AccessControl,v8::PropertyAttribute,v8::SideEffectType)' : 2 ba??ms?z de?i?keni 'uni::FunctionType (__cdecl *)(v8::Local<v8::String>,const uni::GetterCallbackInfo &)' de?erinden 'v8::Local<v8::Name>' de?erine d?nü?türülemez [D:Program Files
odejsPal
ettenzettelGenerator
ode_modulessynchronize
ode_modulesfibersuildfibers.vcxproj]
d:program files
odejspalettenzettelgenerator
ode_modulessynchronize
ode_modulesfiberssrcfibers.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
odejspalettenzettelgenerator
ode_modulessynchronize
ode_modulesfiberssrcfibers.cc(795): error C2660: 'v8::Object::SetAccessor': i?lev 2 ba??ms?z de?i?ken alm?yor [D:Program Files
odejsPalettenzettelGenerator
ode_modulessynchronize
ode_modulesfib
ersuildfibers.vcxproj]
c:usersibrahimappdatalocal
ode-gypcache10.16.0include
odev8.h(3348): note: 'v8::Object::SetAccessor' bildirimine bak?n (kaynak dosyas? derleniyor ..srcfibers.cc)
d:program files
odejspalettenzettelgenerator
ode_modulessynchronize
ode_modulesfiberssrccoroutine.cc(138): warning C4552: '!': ifade sonucu kullan?lm?yor [D:Program Files
odejsPalettenzettelGenerator
ode_modulessynchronize
ode_modulesfibersuildfibers.vcxproj
]
gyp ERR! build error
gyp ERR! stack Error: `D:Program Files (x86)Microsoft Visual Studio2017BuildToolsMSBuild15.0BinMSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (D:Program Files
odejs
ode_modules
ode-gyplibuild.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
odejsPalettenzettelGenerator
ode_modulessynchronize
ode_modulesfibers
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 [email protected] No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node build.js || nodejs build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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:UsersibrahimAppDataRoaming
pm-cache\_logs2019-09-02T23_04_29_295Z-debug.log
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…