LDAP installation error - node.js

when i try to npm install ldapauth, it displays many errors. I spend the last 2 days checking for a solution but nothing. I tried to uninstall/ reinstall node & npm, same with node-gyp, and still got the error and also installed python but still getting below error :
i am getting error in console like this :
C:\Ruby24-x64\Files\MDash>npm install ldapauth
> buffertools#1.1.0 install C:\Ruby24-x64\Files\MDash\node_modules\buffertools
> node-gyp rebuild
C:\Ruby24-x64\Files\MDash\node_modules\buffertools>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\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.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error
MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK vers
ion in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Ruby24-x64\F
iles\MDash\node_modules\buffertools\build\buffertools.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Ruby24-x64\Files\MDash\node_modules\buffertools
gyp ERR! node -v v8.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN minovate#1.2.0 No description
npm WARN minovate#1.2.0 No repository field.
npm WARN minovate#1.2.0 No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! buffertools#1.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the buffertools#1.1.0 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\miracle\AppData\Roaming\npm-cache\_logs\2017-12-06T14_44_34_406Z-debug.log
can you help me.

looks like you miss something : MSB8036: The Windows SDK version 8.1 was not found. You may need to install microsoft visual c++ http://landinghub.visualstudio.com/visual-cpp-build-tools
try to follow the option 1 from this procedure https://github.com/nodejs/node-gyp#on-windows

Related

Problems installing bassaudio library with npm

I'm trying to install bassaudio library to my project, and npm throws an error every time I try to install it, whatever I tried until now to make it work.
I have the following error when I npm install bassaudio :
gyp ERR! build error
gyp ERR! stack Error: C:\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 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Windows_NT 10.0.19041
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\myusername\projectname\node_modules\ref
gyp ERR! node -v v14.13.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ref#1.3.5 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ref#1.3.5 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\myusername\AppData\Roaming\npm-cache_logs\2020-10-15T12_22_17_205Z-debug.log
The log file is enormous and repeat this error at its end, so, not sure it would be relevant to copy paste it completely.
Update : For the next person trying to use bassaudio, or bassaudiolibrary, the first one isn't maintained to recent node/npm version, and the second is up to date, but incomplete.
I made a new package, bassaudio-updated which is updated and as complete as the other both libraries combined. I have only tested if for my needs yet, but I stay availaible if some problems occurs. :)

error while install node-pty libaray using npm

getting the following error while installing the node-pty module of the node.js using npm according to the documentation I use the following command npm i node-pty -g my system and node version is listed following and also window build tools also install version 2017 and 2015 also npm i node-gyp -g command runs successfully.
os: windows 10 pro
version:18363
node:12.16.3
npm:6.14.4
> node-pty#0.9.0 install C:\Program Files\nodejs\node_modules\node-pty
> node scripts/install.js
C:\Users\HP\AppData\Roaming\nvm\v12.16.3\node_modules\node-pty>if not defined npm_config_node_gyp (node "C:\Users\HP\AppData\Roaming\nvm\v12.16.3\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\HP\AppData\Roaming\nvm\v12.16.3\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
conpty.cc
path_util.cc
win_delay_load_hook.cc
C:\\Users\\HP\\AppData\\Local\\node-gyp\\Cache\\12.16.3\\x64\\node.lib : fatal error LNK1127: library is corrupt [C:\Users\HP\AppData\Roaming\nvm\v12.16.3\node_modules\node-pty\build\conpty.vcxproj]
conpty_console_list.cc
win_delay_load_hook.cc
C:\\Users\\HP\\AppData\\Local\\node-gyp\\Cache\\12.16.3\\x64\\node.lib : fatal error LNK1127: library is corrupt [C:\Users\HP\AppData\Roaming\nvm\v12.16.3\node_modules\node-pty\build\conpty_console_list.vcxproj]
AgentLocation.cc
winpty.cc
BackgroundDesktop.cc
Buffer.cc
DebugClient.cc
GenRandom.cc
OwnedHandle.cc
StringUtil.cc
WindowsSecurity.cc
WindowsVersion.cc
WinptyAssert.cc
WinptyException.cc
WinptyVersion.cc
win_delay_load_hook.cc
Creating library C:\Users\HP\AppData\Roaming\nvm\v12.16.3\node_modules\node-pty\build\Release\winpty.lib and object C:\Users\HP\AppData\Roaming\nvm\v12.16.3\node_modules\node-pty\build\Release\winpty.exp
winpty.vcxproj -> C:\Users\HP\AppData\Roaming\nvm\v12.16.3\node_modules\node-pty\build\Release\\winpty.dll
Agent.cc
AgentCreateDesktop.cc
ConsoleFont.cc
ConsoleInput.cc
ConsoleInputReencoding.cc
ConsoleLine.cc
DebugShowInput.cc
DefaultInputMap.cc
EventLoop.cc
InputMap.cc
LargeConsoleRead.cc
NamedPipe.cc
Scraper.cc
Terminal.cc
Win32Console.cc
Win32ConsoleBuffer.cc
main.cc
BackgroundDesktop.cc
Buffer.cc
DebugClient.cc
GenRandom.cc
OwnedHandle.cc
StringUtil.cc
WindowsSecurity.cc
WindowsVersion.cc
WinptyAssert.cc
WinptyException.cc
WinptyVersion.cc
win_delay_load_hook.cc
winpty-agent.vcxproj -> C:\Users\HP\AppData\Roaming\nvm\v12.16.3\node_modules\node-pty\build\Release\\winpty-agent.exe
gyp ERR! build error
gyp ERR! stack Error: `C:\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 (C:\Users\HP\AppData\Roaming\nvm\v12.16.3\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:310:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\HP\\AppData\\Roaming\\nvm\\v12.16.3\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\HP\AppData\Roaming\nvm\v12.16.3\node_modules\node-pty
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-pty#0.9.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-pty#0.9.0 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\HP\AppData\Roaming\npm-cache\_logs\2020-05-29T09_24_34_336Z-debug.log

bitcoinjs-lib package and stack Error: Can't find Python executable on Windows with python 3.x.x

Trying to install the package bitcoinjs-lib I receive the following error:
> tiny-secp256k1#1.0.1 install C:\project\server\node_modules\tiny-secp256k1
> node-gyp rebuild
C:\project\server\node_modules\tiny-secp256k1>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\. .\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Users\myUser\AppData\Local\Programs\Python\Python36-32\python.EXE", you can set the PYTHON env variable .
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\project\server\node_modules\tiny-secp256k1
gyp ERR! node -v v8.9.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN my_project#1.0.0 No description
npm WARN my_project#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tiny-secp256k1#1.0.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the tiny-secp256k1#1.0.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\myUser\AppData\Roaming\npm-cache\_logs\2018-11-07T01_26_57_441Z-debug.log
npm ERR! code ELIFECYCLE
57_470Z-debug.log
I went to node-gyp npm page: https://www.npmjs.com/package/node-gyp and I found that it does not support python v3.x.x
I researched and found some workarounds, however, all of them require actions by the user side and are tied to a particular OS.
I´m using Windows 7 (with Node v8.9.1) and python 3.6.4.
Is there a way to install the dependency and be able to share the package with other users (no matter OS or python version)?
Can anyone provide some kind of input?
I never went through this with a npm package so I´m really stuck and cannot find a proper solution.
Any help will be appreciated.

Node js can't install canvas on windows

I already tried installing it with the official Wiki documentation. No luck for me. I installed GTK and node-gyp too. I am not sure what's wrong.
Here is my error message.
C:\Users\User\Desktop\is vertical>npm i canvas
> canvas#1.6.10 install C:\Users\User\node_modules\canvas
> node-gyp rebuild
C:\Users\User\node_modules\canvas>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build t
ools for v120 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, please install v120 bui
ld tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-cli
ck the solution, and then selecting "Retarget solution". [C:\Users\User\node_modules\canvas\build\canvas.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:180:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\User\node_modules\canvas
gyp ERR! node -v v9.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\User\package.json'
npm WARN User No description
npm WARN User No repository field.
npm WARN User No README data
npm WARN User No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! canvas#1.6.10 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the canvas#1.6.10 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\User\AppData\Roaming\npm-cache\_logs\2018-04-08T22_35_58_874Z-debug.log

kafka-node module exception

I am trying to publish message to kafka broker from nodejs. when am trying to install kafka-node module in nodejs window. am getting exception related to python.
C:\Program Files\nodejs>npm install kafka-node
-
> snappy#4.1.2 install C:\Program Files\nodejs\node_modules\kafka-node\node_modules\snappy
> node-gyp rebuild
C:\Program Files\nodejs\node_modules\kafka-node\node_modules\snappy>if not defined npm_config_node_g
yp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin
\node-gyp.js" rebuild ) else (node rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Python executable "python" is v3.4.0, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at failPythonVersion (C:\Program Files\nodejs\node_modules\npm\node_modules\node-
gyp\lib\configure.js:121:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.j
s:110:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:204:7)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at maybeClose (internal/child_process.js:821:16)
gyp ERR! stack at Socket.<anonymous> (internal/child_process.js:319:11)
gyp ERR! stack at emitOne (events.js:77:13)
gyp ERR! stack at Socket.emit (events.js:169:7)
gyp ERR! stack at Pipe._onclose (net.js:469:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm
\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Program Files\nodejs\node_modules\kafka-node\node_modules\snappy
gyp ERR! node -v v4.3.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\b
in\\npm-cli.js" "install" "kafka-node"
npm ERR! node v4.3.2
npm ERR! npm v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! snappy#4.1.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the snappy#4.1.2 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the snappy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls snappy
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Program Files\nodejs\npm-debug.log
Is there any relation between kafka-node with python. I had setup python 3.4 and again tried to install kafka-node module, it says gyp is not suppported in python3.4 version . ( Below is error message )
So I installed python 2.6 and and again tried to install kafka-node again it is giving below error
C:\Program Files\nodejs\node_modules\kafka-node\node_modules\snappy>if not defined npm_config_node_g
yp (node "C:\Program Files\nodejs\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.
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) ins
tall the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of
the component to the system path if it is installed elsewhere. [C:\Program Files\nodejs\node_modul
es\kafka-node\node_modules\snappy\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit c
ode: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\nod
e-gyp\lib\build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm
\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Program Files\nodejs\node_modules\kafka-node\node_modules\snappy
gyp ERR! node -v v4.3.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\b
in\\npm-cli.js" "install" "kafka-node"
npm ERR! node v4.3.2
npm ERR! npm v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! snappy#4.1.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the snappy#4.1.2 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the snappy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls snappy
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Program Files\nodejs\npm-debug.log
Any help appreciated..Thanks
The error you revived on your second attempt is:
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) ins
tall the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of
the component to the system path if it is installed elsewhere.
Do you have Visual Studio with a C++ compiler installed? if not you should install it.
Other helpful answers can be found on this post :
Error in installing node.js module using npm
node-gyp is used to build the snappy dependency. A compression library. If you don't use compression in your kafka messages you can safely ignore this. This dependency was made optional in version 0.3.3.
If you don't use snappy you can just install the module with --no-optional flag:
npm install kafka-node --no-optional

Resources