环境:
Windows 10
Python 2.7
节点12.8.1
带有cc ++桌面开发的VisualStudio 2017
下面是我在执行executig npm时得到的日志
日志
{
PS D:\ ReactNodeGUI> git clone https://github.com/nodegui/nodegui-starter克隆到'nodegui-starter'...
远程:枚举对象:47,已完成。
远程:计数对象:100%(47/47),已完成。
remote:压缩对象:100%(33/33),已完成。
接收物体:100%(345/345),275.78 KiB | 406.00 KiB / s,已完成。
解析增量:74%(176/236)已使用16(增量14),打包重复使用的298解析增量:0%(0/236)
解析增量:100%(236/236),已完成。
PS D:\ ReactNodeGUI>光盘。\ nodegui-starter \ PS D:\ ReactNodeGUI \ nodegui-starter> npm install
> @ nodegui / qode @ 2.1.0安装后D:\ ReactNodeGUI \ nodegui-starter \ node_modules @ nodegui \ qode
>节点install.js
Cached archive already exists at C:\Users\hp\AppData\Local\qode-nodejs\Cache\qode-win32-x64-v2.1.0.tar.gz. Skipping download....
Extracting C:\Users\hp\AppData\Local\qode-nodejs\Cache\qode-win32-x64-v2.1.0.tar.gz to D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\qode\binaries ...
Qode was setup successfully at : D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\qode\binaries
> @nodegui/nodegui@0.22.0 postinstall D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui
> cross-env npm run setupqt && (node ./scripts/skip.js || npm run prebuild:install || npm run build:addon)
> @nodegui/nodegui@0.22.0 setupqt D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui
> cross-env node ./scripts/setupMiniQt.js
Minimal Qt 5.14.1 setup:
Archive already exists at C:\Users\hp\AppData\Local\nodegui-mini-qt-nodejs\Cache\5.14.1-0-202001240957qttools-Windows-Windows_10-MSVC2017-Windows-Windows_10-X86_64.7z. Skipping download....
Extracting C:\Users\hp\AppData\Local\nodegui-mini-qt-nodejs\Cache\5.14.1-0-202001240957qttools-Windows-Windows_10-MSVC2017-Windows-Windows_10-X86_64.7z to D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\miniqt ...
Archive already exists at C:\Users\hp\AppData\Local\nodegui-mini-qt-nodejs\Cache\5.14.1-0-202001240957qtbase-Windows-Windows_10-MSVC2017-Windows-Windows_10-X86_64.7z. Skipping download....
Extracting C:\Users\hp\AppData\Local\nodegui-mini-qt-nodejs\Cache\5.14.1-0-202001240957qtbase-Windows-Windows_10-MSVC2017-Windows-Windows_10-X86_64.7z to D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\miniqt ...
Qt Tools for Minimal Qt: 5.14.1 installation was setup successfully. outDir: D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\miniqt
Qt Base for Minimal Qt: 5.14.1 installation was setup successfully. outDir: D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\miniqt
> @nodegui/nodegui@0.22.0 prebuild:install D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui
> prebuild-install --backend=cmake-js --runtime=napi --verbose
prebuild-install info begin Prebuild-install version 5.3.4
prebuild-install info looking for cached prebuild @ C:\Users\hp\AppData\Roaming\npm-cache\_prebuilds\e5c5c6-nodegui-v0.22.0-napi-v3-win32-x64.tar.gz
prebuild-install http request GET https://github.com/nodegui/nodegui/releases/download/v0.22.0/nodegui-v0.22.0-napi-v3-win32-x64.tar.gz
prebuild-install http 404 https://github.com/nodegui/nodegui/releases/download/v0.22.0/nodegui-v0.22.0-napi-v3-win32-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=3 runtime=napi arch=x64 libc= platform=win32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @nodegui/nodegui@0.22.0 prebuild:install: `prebuild-install --backend=cmake-js --runtime=napi --verbose`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @nodegui/nodegui@0.22.0 prebuild:install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\hp\AppData\Roaming\npm-cache\_logs\2020-07-07T05_04_04_563Z-debug.log
> @nodegui/nodegui@0.22.0 build:addon D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui
> cross-env CMAKE_BUILD_PARALLEL_LEVEL=8 cmake-js compile
[
'C:\\Program Files\\nodejs\\node.exe',
'D:\\ReactNodeGUI\\nodegui-starter\\node_modules\\cmake-js\\bin\\cmake-js',
'compile'
]
info TOOL Using Visual Studio 15 2017 Win64 generator.
info CMD CONFIGURE
info RUN cmake "D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui" --no-warn-unused-cli -G"Visual Studio 15 2017 Win64" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\build" -DCMAKE_JS_INC="C:\Users\hp\.cmake-js\node-x64\v12.18.1\include\node;D:\ReactNodeGUI\nodegui-starter\node_modules\nan" -DCMAKE_JS_SRC="D:/ReactNodeGUI/nodegui-starter/node_modules/cmake-js/lib/cpp/win_delay_load_hook.cc" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="12.18.1" -DNODE_ARCH="x64" -DCMAKE_JS_LIB="C:\Users\hp\.cmake-js\node-x64\v12.18.1\win-x64\node.lib" -DCMAKE_SHARED_LINKER_FLAGS="/DELAYLOAD:NODE.EXE"
Not searching for unused variables given on the command line.
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18362.
-- The C compiler identification is MSVC 19.16.27041.0
-- The CXX compiler identification is MSVC 19.16.27041.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using QT installation for nodegui_core QT_CMAKE_HOME_DIR:D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\miniqt\5.14.1\msvc2017_64\lib\cmake\Qt5
-- Using Qode installation for nodegui_core QODE_BINARY_DIR:D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\qode\binaries
-- Configuring done
-- Generating done
-- Build files have been written to: D:/ReactNodeGUI/nodegui-starter/node_modules/@nodegui/nodegui/build
info CMD BUILD
info RUN cmake --build "D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\build" --config Release
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Checking Build System
Automatic MOC and UIC for target nodegui_core
Building Custom Rule D:/ReactNodeGUI/nodegui-starter/node_modules/@nodegui/nodegui/CMakeLists.txt
mocs_compilation.cpp
win_delay_load_hook.cc
main.cpp
nutils.cpp
integration.cpp
flexutils.cpp
flexlayout.cpp
flexitem.cpp
nodestyle.cpp
eventsmap.cpp
eventwidget.cpp
yogawidget.cpp
log.cpp
Utils.cpp
YGConfig.cpp
YGEnums.cpp
YGLayout.cpp
YGNode.cpp
YGNodePrint.cpp
YGStyle.cpp
YGValue.cpp
Yoga.cpp
event.cpp
D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\src\cpp\include\deps\yoga\Yoga.cpp(3220): warning C
4244: 'argument': conversion from 'double' to 'float', possible loss of data [D:\ReactNodeGUI\nodegui-starter\nod
e_modules\@nodegui\nodegui\build\nodegui_core.vcxproj]
D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\src\cpp\include\deps\yoga\Yoga.cpp(3257): warning C
4244: 'argument': conversion from 'double' to 'float', possible loss of data [D:\ReactNodeGUI\nodegui-starter\nod
e_modules\@nodegui\nodegui\build\nodegui_core.vcxproj]
D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\src\cpp\include\deps\yoga\Yoga.cpp(3257): warning C
4244: 'return': conversion from 'double' to 'float', possible loss of data [D:\ReactNodeGUI\nodegui-starter\node_
modules\@nodegui\nodegui\build\nodegui_core.vcxproj]
experiments.cpp
qbrush_wrap.cpp
qpen_wrap.cpp
qcolor_wrap.cpp
qapplication_wrap.cpp
qclipboard_wrap.cpp
qkeyevent_wrap.cpp
qmouseevent_wrap.cpp
qfontdatabase_wrap.cpp
qpicture_wrap.cpp
qpixmap_wrap.cpp
qicon_wrap.cpp
qfont_wrap.cpp
D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\src\cpp\lib\QtGui\QPixmap\qpixmap_wrap.cpp(78): war
ning C4267: 'argument': conversion from 'size_t' to 'uint', possible loss of data [D:\ReactNodeGUI\nodegui-starte
r\node_modules\@nodegui\nodegui\build\nodegui_core.vcxproj]
D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\src\cpp\lib\QtGui\QPixmap\qpixmap_wrap.cpp(81): war
ning C4267: 'argument': conversion from 'size_t' to 'uint', possible loss of data [D:\ReactNodeGUI\nodegui-starte
r\node_modules\@nodegui\nodegui\build\nodegui_core.vcxproj]
qcursor_wrap.cpp
qkeysequence_wrap.cpp
qmovie_wrap.cpp
D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\src\cpp\main.cpp : fatal error C1128: number of sec
tions exceeded object file format limit: compile with /bigobj [D:\ReactNodeGUI\nodegui-starter\node_modules\@node
gui\nodegui\build\nodegui_core.vcxproj]
D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\src\cpp\lib\QtGui\QMovie\qmovie_wrap.cpp(85): warni
ng C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data [D:\ReactNodeGUI\nodegui-starter\n
ode_modules\@nodegui\nodegui\build\nodegui_core.vcxproj]
D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\src\cpp\lib\QtGui\QMovie\qmovie_wrap.cpp(171): warn
ing C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data [D:\ReactNodeGUI\nodegui-starter\
node_modules\@nodegui\nodegui\build\nodegui_core.vcxproj]
cl : Command line error D8040: error creating or communicating with child process [D:\ReactNodeGUI\nodegui-starte
r\node_modules\@nodegui\nodegui\build\nodegui_core.vcxproj]
info REP Build has been failed, trying to do a full rebuild.
info CMD CLEAN
info RUN cmake -E remove_directory "D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\build"
info CMD CONFIGURE
info RUN cmake "D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui" --no-warn-unused-cli -G"Visual Studio 15 2017 Win64" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\build" -DCMAKE_JS_INC="C:\Users\hp\.cmake-js\node-x64\v12.18.1\include\node;D:\ReactNodeGUI\nodegui-starter\node_modules\nan" -DCMAKE_JS_SRC="D:/ReactNodeGUI/nodegui-starter/node_modules/cmake-js/lib/cpp/win_delay_load_hook.cc" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="12.18.1" -DNODE_ARCH="x64" -DCMAKE_JS_LIB="C:\Users\hp\.cmake-js\node-x64\v12.18.1\win-x64\node.lib" -DCMAKE_SHARED_LINKER_FLAGS="/DELAYLOAD:NODE.EXE"
Not searching for unused variables given on the command line.
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18362.
-- The C compiler identification is MSVC 19.16.27041.0
-- The CXX compiler identification is MSVC 19.16.27041.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using QT installation for nodegui_core QT_CMAKE_HOME_DIR:D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\miniqt\5.14.1\msvc2017_64\lib\cmake\Qt5
-- Using Qode installation for nodegui_core QODE_BINARY_DIR:D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\qode\binaries
-- Configuring done
-- Generating done
-- Build files have been written to: D:/ReactNodeGUI/nodegui-starter/node_modules/@nodegui/nodegui/build
info CMD BUILD
info RUN cmake --build "D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\build" --config Release
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Checking Build System
Automatic MOC and UIC for target nodegui_core
Building Custom Rule D:/ReactNodeGUI/nodegui-starter/node_modules/@nodegui/nodegui/CMakeLists.txt
mocs_compilation.cpp
win_delay_load_hook.cc
main.cpp
nutils.cpp
integration.cpp
flexutils.cpp
flexlayout.cpp
flexitem.cpp
nodestyle.cpp
eventsmap.cpp
eventwidget.cpp
yogawidget.cpp
log.cpp
Utils.cpp
YGConfig.cpp
YGEnums.cpp
YGLayout.cpp
YGNode.cpp
YGNodePrint.cpp
YGStyle.cpp
YGValue.cpp
Yoga.cpp
event.cpp
D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\src\cpp\include\deps\yoga\Yoga.cpp(3220): warning C
4244: 'argument': conversion from 'double' to 'float', possible loss of data [D:\ReactNodeGUI\nodegui-starter\nod
e_modules\@nodegui\nodegui\build\nodegui_core.vcxproj]
D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\src\cpp\include\deps\yoga\Yoga.cpp(3257): warning C
4244: 'argument': conversion from 'double' to 'float', possible loss of data [D:\ReactNodeGUI\nodegui-starter\nod
e_modules\@nodegui\nodegui\build\nodegui_core.vcxproj]
D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\src\cpp\include\deps\yoga\Yoga.cpp(3257): warning C
4244: 'return': conversion from 'double' to 'float', possible loss of data [D:\ReactNodeGUI\nodegui-starter\node_
modules\@nodegui\nodegui\build\nodegui_core.vcxproj]
experiments.cpp
qbrush_wrap.cpp
qpen_wrap.cpp
qcolor_wrap.cpp
qapplication_wrap.cpp
qclipboard_wrap.cpp
qkeyevent_wrap.cpp
qmouseevent_wrap.cpp
qfontdatabase_wrap.cpp
qpicture_wrap.cpp
qpixmap_wrap.cpp
qicon_wrap.cpp
qfont_wrap.cpp
D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\src\cpp\lib\QtGui\QPixmap\qpixmap_wrap.cpp(78): war
ning C4267: 'argument': conversion from 'size_t' to 'uint', possible loss of data [D:\ReactNodeGUI\nodegui-starte
r\node_modules\@nodegui\nodegui\build\nodegui_core.vcxproj]
D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\src\cpp\lib\QtGui\QPixmap\qpixmap_wrap.cpp(81): war
ning C4267: 'argument': conversion from 'size_t' to 'uint', possible loss of data [D:\ReactNodeGUI\nodegui-starte
r\node_modules\@nodegui\nodegui\build\nodegui_core.vcxproj]
qcursor_wrap.cpp
qkeysequence_wrap.cpp
qmovie_wrap.cpp
D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\src\cpp\main.cpp : fatal error C1128: number of sec
tions exceeded object file format limit: compile with /bigobj [D:\ReactNodeGUI\nodegui-starter\node_modules\@node
gui\nodegui\build\nodegui_core.vcxproj]
D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\src\cpp\lib\QtGui\QMovie\qmovie_wrap.cpp(85): warni
ng C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data [D:\ReactNodeGUI\nodegui-starter\n
ode_modules\@nodegui\nodegui\build\nodegui_core.vcxproj]
D:\ReactNodeGUI\nodegui-starter\node_modules\@nodegui\nodegui\src\cpp\lib\QtGui\QMovie\qmovie_wrap.cpp(171): warn
ing C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data [D:\ReactNodeGUI\nodegui-starter\
node_modules\@nodegui\nodegui\build\nodegui_core.vcxproj]
cl : Command line error D8040: error creating or communicating with child process [D:\ReactNodeGUI\nodegui-starte
r\node_modules\@nodegui\nodegui\build\nodegui_core.vcxproj]
ERR! OMG Process terminated: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @nodegui/nodegui@0.22.0 build:addon: `cross-env CMAKE_BUILD_PARALLEL_LEVEL=8 cmake-js compile`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @nodegui/nodegui@0.22.0 build:addon script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\hp\AppData\Roaming\npm-cache\_logs\2020-07-07T05_08_03_716Z-debug.log
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\watchpack-chokidar2\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@2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @nodegui/nodegui@0.22.0 postinstall: `cross-env npm run setupqt && (node ./scripts/skip.js || npm run prebuild:install || npm run build:addon)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @nodegui/nodegui@0.22.0 postinstall 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\hp\AppData\Roaming\npm-cache\_logs\2020-07-07T05_08_06_476Z-debug.log
PS D:\ReactNodeGUI\nodegui-starter> C:\Users\hp\AppData\Roaming\npm-cache\_logs\2020-07-07T05_08_06_476Z-debug.log
}
答案 0 :(得分:0)
我遇到了同样的问题,这是我为解决它所做的,有些步骤可能不是必需的,但我不确定哪一个是关键的:
然后就成功了!我认为步骤 2,3 很重要。