Unable to install NodeGui and React-NodeGUI in Windows10 - node.js

Environment:
Windows 10
Python 2.7
node 12.8.1
VisualStudio 2017 with cc++ desktop development
Below is the logs which i got it while executig npm install
Logs
{
PS D:\ReactNodeGUI> git clone https://github.com/nodegui/nodegui-starter Cloning into 'nodegui-starter'...
remote: Enumerating objects: 47, done.
remote: Counting objects: 100% (47/47), done.
remote: Compressing objects: 100% (33/33), done.
Receiving objects: 100% (345/345), 275.78 KiB | 406.00 KiB/s, done.
Resolving deltas: 74% (176/236)used 16 (delta 14), pack-reused 298 esolving deltas: 0% (0/236)
Resolving deltas: 100% (236/236), done.
PS D:\ReactNodeGUI> cd .\nodegui-starter\ PS D:\ReactNodeGUI\nodegui-starter> npm install
> #nodegui/qode#2.1.0 postinstall D:\ReactNodeGUI\nodegui-starter\node_modules#nodegui\qode
> node 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
}

I got the same problem and here are what I did to resolve it, some steps may not be necessary but I am not sure which one is critical:
remove and reinstall node.js (with all recommended additional things that I previously did not install such as python, visual studio build tools 2017...)
install cmake from https://cmake.org/
add 'Desktop development with C++' to Visual studio 2019 (previously installed) according to this CMake: Visual Studio 15 2017 could not find any instance of Visual Studio
Then it worked! I think steps 2,3 are important.

Related

How can I avoid rebuilding dependencies when `cargo install` fails due to a system configuration issue?

I'm trying to cargo install a project with many dependencies. One of the later dependencies fails to build due to some system configuration issue:
cargo install diesel_cli
... many dependencies here...
Compiling diesel_cli v1.4.1
error: linking with `cc` failed: exit code: 1
|
= note: ...large output removed...
= note: ld: library not found for -lmysqlclient
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Once I think I've solved the system configuration issue, I need to re-run cargo install, wait a while for the first set of dependencies to build, then see if I get past the failure.
How can I avoid rebuilding all of those dependencies?
The error message contains the directory containing the failed build artifacts:
error: failed to compile `diesel_cli v1.4.1`, intermediate artifacts can be found at `/var/folders/_b/d4_bd15x7s5g99cjvyhpw26w0000gp/T/cargo-installDQOdPD`
You can pass that directory via the --target-dir option (or setting the CARGO_TARGET_DIR environment variable) to use it again, avoiding rebuilding the dependencies:
cargo install diesel_cli --target-dir=/var/folders/_b/d4_bd15x7s5g99cjvyhpw26w0000gp/T/cargo-installDQOdPD

macOS & dyld: Symbol not found: _usdt_create_provider

In short, I'm unable to install #pact-foundation/pact-node on my development computer and from what I gather it seems to be loosely related to being on macOS 10.14. When I say loosely, this does not affect my other non-development computer running the same stack.
Within nvm I've tried using Node 8.14.0, 8.15.0, 9.4.0, 10.14.2, 10.15.0 and 11.6.0, in addition to system Node, which is also 11.6.0. Each version results in the same error messages, regardless of whether I'm in my team's project directory or in an otherwise empty sandbox directory.
Until a few minutes ago I was running macOS 10.14.1 and am seeing the same problems on 10.14.2. There are no updates that haven't been installed.
The package installation output is as follows.
$ npm install #pact-foundation/pact-node
> dtrace-provider#0.8.7 install /Users/andrewgould/www/sandbox/node_modules/dtrace-provider
> node-gyp rebuild || node suppress-error.js
ACTION binding_gyp_ndtp_target_build_ndtp .
TOUCH Release/obj.target/ndtp.stamp
> spawn-sync#1.0.15 postinstall /Users/andrewgould/www/sandbox/node_modules/spawn-sync
> node postinstall
> caporal#0.10.0 postinstall /Users/andrewgould/www/sandbox/node_modules/caporal
> (test -f ./node_modules/husky/bin/install.js && node ./node_modules/husky/bin/install.js) || exit 0
> #pact-foundation/pact-node#6.20.0 postinstall /Users/andrewgould/www/sandbox/node_modules/#pact-foundation/pact-node
> node postinstall.js
dyld: lazy symbol binding failed: Symbol not found: _usdt_create_provider
Referenced from: /Users/andrewgould/www/sandbox/node_modules/dtrace-provider/src/build/Release/DTraceProviderBindings.node
Expected in: flat namespace
dyld: Symbol not found: _usdt_create_provider
Referenced from: /Users/andrewgould/www/sandbox/node_modules/dtrace-provider/src/build/Release/DTraceProviderBindings.node
Expected in: flat namespace
Abort trap: 6
Has anyone seen errors like these before? Is there a solution known?
It turns out this issue was caused by binutils, which I had installed via Homebrew. Uninstalling that fixed the problem.
From the GNU binutils website, the main packages included in it are ld, the GNU linker, and as, the GNU assembler. Both tools are included with macOS, however the Homebrew versions of these tools caused the conflicts shown in the above question.

npm install bcrypt - no errors but a whole raft of warnings on windows 7

OK, so all the brcypt issues on here seem to be node-gyp related, but after playing with bcrypt for a while I finally got it installing with no errors and node-gyp seems happy, but I am still getting quite a few warnings. It's obviously related to visual studio but I can't find anything about these specifically.
I'm on windows 7 x64 ultimate and have:
visual studio 2012 utlimate
visual studio 2013 ultimate
python 0.2.7.10
windows 7 x64 sdk with all updates
Win64OpenSSL-1_0_lt
I'm getting the following warnings:
D:\WebstormProjects\authapp>npm install --save bcrypt
npm WARN package.json authapp#1.0.0 No description
npm WARN package.json authapp#1.0.0 No README data
bcrypt#0.8.6 install D:\WebstormProjects\authapp\node_modules\bcrypt
node-gyp rebuild
D:\WebstormProjects\authapp\node_modules\bcrypt>if not defined npm_config_node_gyp (node "C:\Program Files\n
odejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node
"" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
blowfish.cc
bcrypt.cc
bcrypt_node.cc
**..\src\bcrypt.cc(232): warning C4267: '=' : conversion from 'size_t' to 'unsigned char', possible loss of d
ata [D:\WebstormProjects\authapp\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
..\src\bcrypt_node.cc(76): warning C4244: 'argument' : conversion from 'ssize_t' to 'unsigned char', possib
le loss of data [D:\WebstormProjects\authapp\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
..\src\bcrypt_node.cc(229): warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible los
s of data [D:\WebstormProjects\authapp\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
..\src\bcrypt_node.cc(230): warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible los
s of data [D:\WebstormProjects\authapp\node_modules\bcrypt\build\bcrypt_lib.vcxproj]**
win_delay_load_hook.c
Creating library D:\WebstormProjects\authapp\node_modules\bcrypt\build\Release\bcrypt_lib.lib and obje
ct D:\WebstormProjects\authapp\node_modules\bcrypt\build\Release\bcrypt_lib.exp
Generating code
Finished generating code
bcrypt_lib.vcxproj -> D:\WebstormProjects\authapp\node_modules\bcrypt\build\Release\\bcrypt_lib.node
bcrypt#0.8.6 node_modules\bcrypt
├── bindings#1.2.1
└── nan#2.2.1
Does anyone have any ideas what's gone wrong here?
Thanks.
If you're on Windows, I recommend you use Bcrypt-NodeJS to avoid these errors if possible. You'll get about the same functionality, as far as I can tell.

Fail to install cairo haskell bindings on windows

I am trying to install cairo-0.12.4 Haskell package on Windows 7. I first downloaded and unpacked Gtk+2 and added its bin subdir to PATH. I then tried to run cabal with extra libs and includes:
cabal --extra-lib-dirs="d:\Program Files (x86)\Gtk+\lib"
--extra-include-dirs="d:\Program Files (x86)\Gtk+\include" install
But I got the following error
Reading available packages...
Choosing modular solver.
Resolving dependencies...
Ready to install cairo-0.12.4
Waiting for install task to finish...
Extracting
C:\Users\abailly\AppData\Roaming\cabal\packages\hackage.haskell.org\cairo\0.12.4\cairo-0.12.4.tar.gz
to C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368...
Updating cairo.cabal with the latest revision from the index.
creating
C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup
creating
C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist
creating
C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup
d:\Program Files (x86)\Haskell Platform\2012.2.0.0\bin\ghc.exe --make C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-
0.12.4\Setup.hs -o C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup\setup.exe -odir C:\Users\abailly\
AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup -hidir C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.
12.4\dist\setup -i -iC:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4 -package Cabal-1.14.0
[1 of 2] Compiling SetupWrapper ( C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\SetupWrapper.hs, C:\Users
\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup\SetupWrapper.o )
[2 of 2] Compiling Main ( C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\Setup.hs, C:\Users\abaill
y\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup\Main.o )
Linking C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup\setup.exe ...
C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup\setup.exe
configure --verbose=2 --ghc --prefix=C:\Users\abailly\AppData\Roaming\cabal
--user --flags=cairo_svg --flags=cairo_ps --flags=cairo_pdf
--extra-include-dirs=D:\Program Files (x86)\Gtk+\include
--extra-lib-dirs=D:\Program Files (x86)\Gtk+\lib --constraint=mtl ==2.1.2
--constraint=bytestring ==0.9.2.1 --constraint=base ==4.5.0.0
--constraint=array ==0.4.0.0 --disable-tests --disable-benchmarks
[1 of 2] Compiling Gtk2HsSetup ( Gtk2HsSetup.hs, dist\setup-wrapper\Gtk2HsSetup.o )
[2 of 2] Compiling Main ( SetupMain.hs, dist\setup-wrapper\Main.o )
Linking dist/setup-wrapper\setup.exe ...
Configuring cairo-0.12.4...
Flags chosen: cairo_svg=True, cairo_ps=True, cairo_pdf=True
Dependency array ==0.4.0.0: using array-0.4.0.0
Dependency base ==4.5.0.0: using base-4.5.0.0
Dependency bytestring ==0.9.2.1: using bytestring-0.9.2.1
Dependency mtl ==2.1.2: using mtl-2.1.2
Dependency cairo-pdf -any: using version 1.10.2
Dependency cairo-ps -any: using version 1.10.2
Dependency cairo-svg -any: using version 1.10.2
Dependency cairo >=1.2.0: using version 1.10.2
Using Cabal-1.14.0 compiled by ghc-7.4
Using compiler: ghc-7.4.1
Using install prefix: C:\Users\abailly\AppData\Roaming\cabal
Binaries installed in: C:\Users\abailly\AppData\Roaming\cabal\bin
Libraries installed in:
C:\Users\abailly\AppData\Roaming\cabal\cairo-0.12.4\ghc-7.4.1
Private binaries installed in:
C:\Users\abailly\AppData\Roaming\cabal\cairo-0.12.4
Data files installed in: C:\Users\abailly\AppData\Roaming\cabal\cairo-0.12.4
Documentation installed in:
C:\Users\abailly\AppData\Roaming\cabal\doc\cairo-0.12.4
Using alex version 3.0.1 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\lib\extralibs\bin\alex.exe
Using ar found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\mingw\bin\ar.exe
No c2hs found
Using cpphs version 1.16 found on system at:
c:\Users\abailly\AppData\Roaming\cabal\bin\cpphs.exe
No ffihugs found
Using gcc version 4.5.2 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\mingw\bin\gcc.exe
Using ghc version 7.4.1 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\bin\ghc.exe
Using ghc-pkg version 7.4.1 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\bin\ghc-pkg.exe
No greencard found
Using gtk2hsC2hs version 0.13.6 found on system at:
c:\Users\abailly\AppData\Roaming\cabal\bin\gtk2hsC2hs.exe
Using gtk2hsHookGenerator found on system at:
c:\Users\abailly\AppData\Roaming\cabal\bin\gtk2hsHookGenerator.exe
Using gtk2hsTypeGen found on system at:
c:\Users\abailly\AppData\Roaming\cabal\bin\gtk2hsTypeGen.exe
Using haddock version 2.10.0 found on system at: d:\Program Files
(x86)\Haskell Platform\2012.2.0.0\bin\haddock.exe
Using happy version 1.18.9 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\lib\extralibs\bin\happy.exe
No hmake found
Using hpc version 0.6 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\bin\hpc.exe
Using hsc2hs version 0.67 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\bin\hsc2hs.exe
Using hscolour version 1.20 found on system at:
c:\Users\abailly\AppData\Roaming\cabal\bin\HsColour.exe
No hugs found
No jhc found
Using ld found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\mingw\bin\ld.exe
No lhc found
No lhc-pkg found
No nhc98 found
Using pkg-config version 0.26 found on system at: d:\Program Files
(x86)\Gtk+\bin\pkg-config.exe
Using ranlib found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\mingw\bin\ranlib.exe
Using strip found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\mingw\bin\strip.exe
Using tar found on system at: D:\Program Files (x86)\Git\bin\tar.exe
No uhc found
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo-pdf
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo-ps
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo-svg
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo
setup.exe: Missing dependencies on foreign libraries:
* Missing C libraries: z, cairo
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
Failed to install cairo-0.12.4
cabal.exe: Error: some packages failed to install:
Chart-0.16 depends on cairo-0.12.4 which failed to install.
cairo-0.12.4 failed during the configure step. The exception was:
ExitFailure 1
splot-0.3.8 depends on cairo-0.12.4 which failed to install.
When I try to install cairo directly, I got the following:
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo-pdf
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo-ps
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo-svg
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo
setup.exe: Missing dependencies on foreign libraries:
* Missing C libraries: z, cairo
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
Failed to install cairo-0.12.4
World file is already up to date.
cabal.exe: Error: some packages failed to install:
cairo-0.12.4 failed during the configure step. The exception was:
ExitFailure 1
I am clueless...
If you read the error message:
* Missing C libraries: z, cairo
It is saying you need to install the libraries (and header files) for the libraries libz and cairo. On *nix systems this usually means just installing the -dev versions of these packages with your package manager. On windows I assume you'd download the source version of the library and install.
I got this problem. In my case it was a mismatch between a 64-bit ghc and a 32-bit cairo dll
I moved the Gtk+ library to D:\soft\gtk+\ and everything runs fine. The path to Gtk+ contain space which does not seem to be correctly interpreted by cabal/ghc, although I double-quoted it:
--extra-lib-dirs="d:\Program Files (x86)\Gtk+\lib"
Solution: Put gtk+ in a space-free location.
Update: Now, it fails to install Chart-0.16 with an even more cryptic error:
Loading package Win32-2.2.2.0 ... linking ... done.
Loading package array-0.4.0.0 ... linking ... done.
Loading package deepseq-1.3.0.0 ... linking ... done.
Loading package old-locale-1.0.0.4 ... linking ... done.
Loading package time-1.4 ... linking ... done.
Loading package containers-0.4.2.1 ... linking ... done.
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package data-accessor-0.2.2.3 ... linking ... done.
Loading package pretty-1.1.1.0 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package utility-ht-0.0.8 ... linking ... done.
Loading package data-accessor-template-0.2.1.10 ... linking ... done.
Loading package colour-2.3.3 ... linking ... done.
Loading package mtl-2.1.2 ... linking ... done.
*** gcc:
"D:\Program Files (x86)\Haskell Platform\2012.2.0.0\lib/../mingw/bin/gcc.exe" "-fno-stack-protector" "-Wl,--hash-size=31" "-Wl,--r
educe-memory-overheads" "-LC:\Users\abailly\AppData\Roaming\cabal\cairo-0.12.4\ghc-7.4.1" "-Ld:/soft/Gtk+/lib" "--print-file-name"
"libz.dll"
*** gcc:
"D:\Program Files (x86)\Haskell Platform\2012.2.0.0\lib/../mingw/bin/gcc.exe" "-fno-stack-protector" "-Wl,--hash-size=31" "-Wl,--r
educe-memory-overheads" "-LC:\Users\abailly\AppData\Roaming\cabal\cairo-0.12.4\ghc-7.4.1" "-Ld:/soft/Gtk+/lib" "--print-file-name"
"libcairo-2.dll"
Loading package cairo-0.12.4 ... d:\Program Files (x86)\Haskell Platform\2012.2.0.0\bin\ghc.exe returned
ExitFailure 1
Failed to install Chart-0.16
cabal.exe: Error: some packages failed to install:
Chart-0.16 failed during the building phase. The exception was:
ExitFailure 1
splot-0.3.8 depends on Chart-0.16 which failed to install.
I suspect this is due to a linking error as the compilation runs fine when I execute the following command which is what cabal outputs in debug mode:
"D:\\Program Files (x86)\\Haskell Platform\\2012.2.0.0\\bin\\ghc.exe"
"--make" "-v" "-fbuilding-cabal-package" "-O" "-odir" "dist\\build"
"-hidir" "dist\\build" "-stubdir" "dist\\build" "-i" "-idist\\build"
"-i." "-idist\\build\\autogen" "-Idist\\build\\autogen"
"-Idist\\build" "-optP-include"
"-optPdist\\build\\autogen\\cabal_macros.h" "-package-name"
"Chart-0.16" "-hide-all-packages" "-package-conf"
"dist\\package.conf.inplace" "-package-id"
"array-0.4.0.0-3cf1bc3f5cd0078adea24752c18081b9" "-package-id"
"base-4.5.0.0-597748f6f53a7442bcae283373264bb6" "-package-id"
"cairo-0.12.4-f04021ea456c901e8d05395a31f7a861" "-package-id"
"colour-2.3.3-4eaa610bb6d825a7334e1b3de448f6c0" "-package-id"
"data-accessor-0.2.2.3-5477c48e3478339fdff299c536a033c6" "-package-id"
"data-accessor-template-0.2.1.10-28ee96821fd908880f3a49417c4da548"
"-package-id" "mtl-2.1.2-7ec8bbada2af74b49c6e4aeea2889fdc"
"-package-id" "old-locale-1.0.0.4-29bd50ed2bb4a20928338f52e4ab1b71"
"-package-id" "time-1.4-01d7bf22d87e70510fe9ee4c4434b3ab"
"-XHaskell98" "Graphics.Rendering.Chart"
"Graphics.Rendering.Chart.Types" "Graphics.Rendering.Chart.Renderable"
"Graphics.Rendering.Chart.Axis"
"Graphics.Rendering.Chart.Axis.Floating"
"Graphics.Rendering.Chart.Axis.Indexed"
"Graphics.Rendering.Chart.Axis.Int"
"Graphics.Rendering.Chart.Axis.LocalTime"
"Graphics.Rendering.Chart.Axis.Types"
"Graphics.Rendering.Chart.Axis.Unit" "Graphics.Rendering.Chart.Layout"
"Graphics.Rendering.Chart.Legend" "Graphics.Rendering.Chart.Simple"
"Graphics.Rendering.Chart.Simple.Internal"
"Graphics.Rendering.Chart.Grid" "Graphics.Rendering.Chart.Plot"
"Graphics.Rendering.Chart.Plot.Types"
"Graphics.Rendering.Chart.Plot.Annotation"
"Graphics.Rendering.Chart.Plot.AreaSpots"
"Graphics.Rendering.Chart.Plot.Bars"
"Graphics.Rendering.Chart.Plot.Candle"
"Graphics.Rendering.Chart.Plot.ErrBars"
"Graphics.Rendering.Chart.Plot.FillBetween"
"Graphics.Rendering.Chart.Plot.Hidden"
"Graphics.Rendering.Chart.Plot.Lines"
"Graphics.Rendering.Chart.Plot.Pie"
"Graphics.Rendering.Chart.Plot.Points"
"Graphics.Rendering.Chart.SparkLine" "-hide-package" "monads-tf"
I am even more puzzled...
Update (2): When I run cabal install > out 2>&1 it succeeds!

Node.js and npm pg for postgres error

I am attempting to get the Postgesql client for node working with NPM. Using node v0.6.14 and receiving the following error:
pg#0.5.4 install /Users/matt/Sites/node_test/node_modules/pg
node-waf configure build || true
Checking for program g++ or c++ : /usr/bin/g++
...
'configure' finished successfully (0.082s)
Waf: Entering directory '/Users/matt/Sites/node_test/node_modules/pg/build'
[1/2] cxx: src/binding.cc -> build/Release/src/binding_1.o
../src/binding.cc:3:25: error: node_events.h: No such file or directory
...
Build failed: -> task failed (err #1):
{task: cxx binding.cc -> binding_1.o}
pg#0.5.4 ./node_modules/pg
└── generic-pool#1.0.6`
I have set the $NODE_PATH, and feel a bit stuck at this point, not quite knowing what is wrong. Thank you!
I was following the Heroku 'Getting Started with Node.js' article and that suggests using v0.5.4 of the pg package.
However, I am using version 0.6.x of Node and that so I was getting this same error you are.
I fixed it by changing my package.json file to specify v 0.6.15 of pg.
"dependencies": {
"pg": "0.6.15"
}

Resources