Why i couldn't download this node "node-red-contrib-bluetooth-serial-port"? It display this following message at the view log


2024-07-27T05:27:09.085Z Install : node-red-contrib-bluetooth-serial-port 0.0.1

2024-07-27T05:27:09.094Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --omit=dev --engine-strict node-red-contrib-bluetooth-serial-port@0.0.1
2024-07-27T05:27:14.608Z [err] npm warn deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: Array.prototype.sort() - JavaScript | MDN
2024-07-27T05:27:17.391Z [err] npm warn cleanup Failed to remove some directories [
2024-07-27T05:27:17.391Z [err] npm warn cleanup [
2024-07-27T05:27:17.391Z [err] npm warn cleanup 'C:\Users\admin\.node-red\node_modules\bluetooth-hci-socket',
2024-07-27T05:27:17.391Z [err] npm warn cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\admin.node-red\node_modules\bluetooth-hci-socket'] {
2024-07-27T05:27:17.391Z [err] npm warn cleanup errno: -4082,
2024-07-27T05:27:17.391Z [err] npm warn cleanup code: 'EBUSY',
2024-07-27T05:27:17.391Z [err] npm warn cleanup syscall: 'rmdir',
2024-07-27T05:27:17.391Z [err] npm warn cleanup path: 'C:\Users\admin\.node-red\node_modules\bluetooth-hci-socket'
2024-07-27T05:27:17.391Z [err] npm warn cleanup }
2024-07-27T05:27:17.391Z [err] npm warn cleanup ],
2024-07-27T05:27:17.391Z [err] npm warn cleanup [
2024-07-27T05:27:17.391Z [err] npm warn cleanup 'C:\Users\admin\.node-red\node_modules\snappy',
2024-07-27T05:27:17.391Z [err] npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\admin.node-red\node_modules\snappy\node_modules\node-gyp\bin'] {
2024-07-27T05:27:17.391Z [err] npm warn cleanup errno: -4048,
2024-07-27T05:27:17.391Z [err] npm warn cleanup code: 'EPERM',
2024-07-27T05:27:17.391Z [err] npm warn cleanup syscall: 'rmdir',
2024-07-27T05:27:17.391Z [err] npm warn cleanup path: 'C:\Users\admin\.node-red\node_modules\snappy\node_modules\node-gyp\bin'
2024-07-27T05:27:17.391Z [err] npm warn cleanup }
2024-07-27T05:27:17.391Z [err] npm warn cleanup ]
2024-07-27T05:27:17.391Z [err] npm warn cleanup ]
2024-07-27T05:27:17.401Z [err] npm error code 1
2024-07-27T05:27:17.402Z [err] npm error path C:\Users\admin.node-red\node_modules\bluetooth-serial-port
2024-07-27T05:27:17.402Z [err] npm error command failed
2024-07-27T05:27:17.402Z [err] npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp configure build
2024-07-27T05:27:17.402Z [err] npm error gyp info it worked if it ends with ok
2024-07-27T05:27:17.402Z [err] npm error gyp info using node-gyp@3.8.0
2024-07-27T05:27:17.402Z [err] npm error gyp info using node@20.16.0 | win32 | x64
2024-07-27T05:27:17.402Z [err] npm error gyp ERR! configure error
2024-07-27T05:27:17.402Z [err] npm error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
2024-07-27T05:27:17.402Z [err] npm error gyp ERR! stack at PythonFinder.failNoPython (C:\Users\admin.node-red\node_modules\node-gyp\lib\configure.js:484:19)
2024-07-27T05:27:17.402Z [err] npm error gyp ERR! stack at PythonFinder. (C:\Users\admin.node-red\node_modules\node-gyp\lib\configure.js:509:16)
2024-07-27T05:27:17.402Z [err] npm error gyp ERR! stack at callback (C:\Users\admin.node-red\node_modules\graceful-fs\polyfills.js:306:20)
2024-07-27T05:27:17.402Z [err] npm error gyp ERR! stack at FSReqCallback.oncomplete (node:fs:197:21)
2024-07-27T05:27:17.402Z [err] npm error gyp ERR! System Windows_NT 10.0.22631
2024-07-27T05:27:17.402Z [err] npm error gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\admin\.node-red\node_modules\node-gyp\bin\node-gyp.js" "configure" "build"
2024-07-27T05:27:17.402Z [err] npm error gyp ERR! cwd C:\Users\admin.node-red\node_modules\bluetooth-serial-port
2024-07-27T05:27:17.402Z [err] npm error gyp ERR! node -v v20.16.0
2024-07-27T05:27:17.402Z [err] npm error gyp ERR! node-gyp -v v3.8.0
2024-07-27T05:27:17.402Z [err] npm error gyp ERR! not ok
2024-07-27T05:27:17.405Z [err] npm error A complete log of this run can be found in: C:\Users\admin\AppData\Local\npm-cache_logs\2024-07-27T05_27_09_721Z-debug-0.log
2024-07-27T05:27:17.438Z rc=1

It is very likely you did NOT tick the checkbox to install native tools.

Similar post: Modbus TCP registers from one server - #7 by Steve-Mcl

After do what you say, it still not working. But this time it is showing this in the log:

2024-07-29T08:34:56.465Z Install : node-red-contrib-bluetooth-serial-port 0.0.1

2024-07-29T08:34:56.471Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --omit=dev --engine-strict node-red-contrib-bluetooth-serial-port@0.0.1
2024-07-29T08:35:01.548Z [err] npm warn deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: Array.prototype.sort() - JavaScript | MDN
2024-07-29T08:35:02.516Z [err] npm error code 1
2024-07-29T08:35:02.516Z [err] npm error path C:\Users\admin.node-red\node_modules\bluetooth-serial-port
2024-07-29T08:35:02.520Z [err] npm error command failed
2024-07-29T08:35:02.520Z [err] npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp configure build
2024-07-29T08:35:02.520Z [err] npm error gyp info it worked if it ends with ok
2024-07-29T08:35:02.520Z [err] npm error gyp info using node-gyp@3.8.0
2024-07-29T08:35:02.520Z [err] npm error gyp info using node@18.20.4 | win32 | x64
2024-07-29T08:35:02.520Z [err] npm error gyp ERR! configure error
2024-07-29T08:35:02.520Z [err] npm error gyp ERR! stack Error: Command failed: C:\Users\admin\AppData\Local\Programs\Python\Python312\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
2024-07-29T08:35:02.520Z [err] npm error gyp ERR! stack File "", line 1
2024-07-29T08:35:02.520Z [err] npm error gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
2024-07-29T08:35:02.520Z [err] npm error gyp ERR! stack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-29T08:35:02.520Z [err] npm error gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
2024-07-29T08:35:02.520Z [err] npm error gyp ERR! stack
2024-07-29T08:35:02.520Z [err] npm error gyp ERR! stack at ChildProcess.exithandler (node:child_process:422:12)
2024-07-29T08:35:02.520Z [err] npm error gyp ERR! stack at ChildProcess.emit (node:events:517:28)
2024-07-29T08:35:02.520Z [err] npm error gyp ERR! stack at maybeClose (node:internal/child_process:1098:16)
2024-07-29T08:35:02.520Z [err] npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:303:5)
2024-07-29T08:35:02.520Z [err] npm error gyp ERR! System Windows_NT 10.0.22631
2024-07-29T08:35:02.520Z [err] npm error gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\admin\.node-red\node_modules\node-gyp\bin\node-gyp.js" "configure" "build"
2024-07-29T08:35:02.520Z [err] npm error gyp ERR! cwd C:\Users\admin.node-red\node_modules\bluetooth-serial-port
2024-07-29T08:35:02.520Z [err] npm error gyp ERR! node -v v18.20.4
2024-07-29T08:35:02.520Z [err] npm error gyp ERR! node-gyp -v v3.8.0
2024-07-29T08:35:02.520Z [err] npm error gyp ERR! not ok
2024-07-29T08:35:02.523Z [err]
2024-07-29T08:35:02.523Z [err] npm error A complete log of this run can be found in: C:\Users\admin\AppData\Local\npm-cache_logs\2024-07-29T08_34_57_158Z-debug-0.log
2024-07-29T08:35:02.553Z rc=1

Reading this issue it appears the node no longer works and is not maintained. You may need to find an alternative.