S
S
StavrovDima2021-04-19 16:52:03
Node.js
StavrovDima, 2021-04-19 16:52:03

Node-Red error Error: Module did not self-register. What to do?

Good day. I do everything according to the methodology. It was necessary to install the Node-Red package through NodeJS, and two modules on it:
node-red-contrib-bme280
node-red-contrib-sensor-htu21d
The first one miraculously installed, but now when Node-Red starts, it writes the following:

[Bme280:f8a09a6b.fe7db8] Error: Module did not self-register: '\\?\C:\Users\{UserName}\node_modules\i2c-bus\build\Release\i2c.node'.

When I try to install the second module, it doesn't install at all and writes a huge bunch of errors:
2021-04-19T13:48:02.729Z Install : node-red-contrib-sensor-htu21d 1.0.1

2021-04-19T13:48:02.748Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production [email protected]
2021-04-19T13:48:05.485Z [err] npm
2021-04-19T13:48:05.485Z [err]  ERR! code 1
2021-04-19T13:48:05.485Z [err] npm ERR! path C:\Users\PantyDev\.node-red\node_modules\i2c-bus
2021-04-19T13:48:05.486Z [err] npm ERR!
2021-04-19T13:48:05.487Z [err]  command failed
2021-04-19T13:48:05.487Z [err] npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
2021-04-19T13:48:05.487Z [err] npm ERR!
2021-04-19T13:48:05.487Z [err]  ����஥��� �஥�⮢ � �⮬ �襭�� �� ������. �⮡� ������� ��ࠫ���쭮� ����஥���, ������� ��ࠬ��� "/m".
2021-04-19T13:48:05.487Z [err] npm ERR! MSBUILD : error MSB3428: ����㧪� ��������� Visual C++ "VCBuild.exe" ����������. ���ᮡ� �襭�� �஡����: 1) ��⠭���� .NET Framework 2.0 SDK, 2) ��⠭���� Microsoft Visual Studio 2005 ��� 3) 㪠����� ���� ��������� � ��⥬��� ���, �᫨ ��������� ��⠭����� � ��㣮� ����.  [C:\Users\PantyDev\.node-red\node_modules\i2c-bus\build\binding.sln]
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info it worked if it ends with ok
2021-04-19T13:48:05.487Z [err] npm ERR!
2021-04-19T13:48:05.487Z [err]  gyp info using [email protected]
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info using [email protected] | win32 | x64
2021-04-19T13:48:05.487Z [err] npm ERR!
2021-04-19T13:48:05.487Z [err]  gyp info spawn C:\Users\PantyDev\.windows-build-tools\python27\python.exe
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args [
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args   'C:\\Users\\PantyDev\\.node-red\\node_modules\\node-gyp\\gyp\\gyp_main.py',
2021-04-19T13:48:05.487Z [err] npm ERR!
2021-04-19T13:48:05.487Z [err]  gyp info spawn args   'binding.gyp',
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args   '-f',
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args   'msvs',
2021-04-19T13:48:05.487Z [err] npm
2021-04-19T13:48:05.487Z [err]  ERR! gyp info spawn args   '-G',
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args   'msvs_version=auto',
2021-04-19T13:48:05.487Z [err] npm ERR!
2021-04-19T13:48:05.487Z [err]  gyp info spawn args   '-I',
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args   'C:\\Users\\PantyDev\\.node-red\\node_modules\\i2c-bus\\build\\config.gypi',
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args   '-I',
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args   'C:\\Users\\PantyDev\\.node-red\\node_modules\\node-gyp\\addon.gypi',
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args   '-I',
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args   'C:\\Users\\PantyDev\\.node-gyp\\14.15.4\\include\\node\\common.gypi',
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
2021-04-19T13:48:05.487Z [err] npm
2021-04-19T13:48:05.487Z [err]  ERR! gyp info spawn args   '-Dvisibility=default',
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args   '-Dnode_root_dir=C:\\Users\\PantyDev\\.node-gyp\\14.15.4',
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\PantyDev\\.node-red\\node_modules\\node-gyp',
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args   '-Dnode_lib_file=node.lib',
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\PantyDev\\.node-red\\node_modules\\i2c-bus',
2021-04-19T13:48:05.487Z [err] npm
2021-04-19T13:48:05.487Z [err]  ERR! gyp info spawn args   '--depth=.',
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args   '--no-parallel',
2021-04-19T13:48:05.487Z [err] npm
2021-04-19T13:48:05.487Z [err]  ERR! gyp info spawn args   '--generator-output',
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args   'C:\\Users\\PantyDev\\.node-red\\node_modules\\i2c-bus\\build',
2021-04-19T13:48:05.487Z [err] npm
2021-04-19T13:48:05.487Z [err]  ERR! gyp info spawn args   '-Goutput_dir=.'
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args ]
2021-04-19T13:48:05.487Z [err] npm
2021-04-19T13:48:05.487Z [err]  ERR! Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
2021-04-19T13:48:05.487Z [err] npm ERR! Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args [
2021-04-19T13:48:05.487Z [err] npm
2021-04-19T13:48:05.487Z [err]  ERR! gyp info spawn args   'build/binding.sln',
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args   '/clp:Verbosity=minimal',
2021-04-19T13:48:05.487Z [err] npm
2021-04-19T13:48:05.487Z [err]  ERR! gyp info spawn args   '/nologo',
2021-04-19T13:48:05.487Z [err] npm ERR! gyp info spawn args   '/p:Configuration=Release;Platform=x64'
2021-04-19T13:48:05.487Z [err] npm
2021-04-19T13:48:05.487Z [err]  ERR! gyp info spawn args ]
2021-04-19T13:48:05.487Z [err] npm ERR! gyp ERR! build error 
2021-04-19T13:48:05.487Z [err] npm
2021-04-19T13:48:05.487Z [err]  ERR! gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
2021-04-19T13:48:05.487Z [err] npm ERR! gyp ERR! stack     at ChildProcess.onExit (C:\Users\PantyDev\.node-red\node_modules\node-gyp\lib\build.js:276:23)
2021-04-19T13:48:05.487Z [err] npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
2021-04-19T13:48:05.487Z [err] npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
2021-04-19T13:48:05.487Z [err] npm ERR! gyp ERR! System Windows_NT 10.0.19042
2021-04-19T13:48:05.487Z [err] npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\PantyDev\\.node-red\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
2021-04-19T13:48:05.487Z [err] npm ERR! gyp ERR! cwd C:\Users\PantyDev\.node-red\node_modules\i2c-bus
2021-04-19T13:48:05.487Z [err] npm ERR! gyp ERR! node -v v14.15.4
2021-04-19T13:48:05.488Z [err] npm ERR! gyp ERR! node-gyp -v v3.4.0
2021-04-19T13:48:05.488Z [err] npm ERR!
2021-04-19T13:48:05.488Z [err]  gyp ERR! not ok
2021-04-19T13:48:05.494Z [err] 
2021-04-19T13:48:05.494Z [err] npm ERR! A complete log of this run can be found in:
2021-04-19T13:48:05.494Z [err] npm ERR!     C:\Users\PantyDev\AppData\Local\npm-cache\_logs\2021-04-19T13_48_05_487Z-debug.log
2021-04-19T13:48:05.506Z rc=1

Help me understand what's going on. I searched on the Internet - everywhere they write to do npm rebuild or npm clear cache or npm install, but nothing helps. Perhaps you have come across this?
I would be very grateful if you direct me to the right direction to solve the problem, otherwise I don’t understand anything at all ... :(

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question