Hello,
I try to install the package via npm install bluetooth-hci-socket or sudo npm install bluetooth-hci-socket, but I always get the same error (does not have permission to access the dev dir "/root/.cache/node-gyp/15.5.1").
I have tried to log as root and install with -g but it's the same.
I have already install the bluetooth stuff : sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev
Node Version: v15.5.1 (npm 7.6.0)
Platform: Linux Mint 20.1
node-gyp: 7.1.2
Compiler: gcc version 9.3.0
Verbose output :
```
136 info run bluetooth-hci-socket@0.5.1 install { code: 1, signal: null }
137 timing reify:rollback:createSparse Completed in 82ms
138 timing reify:rollback:retireShallow Completed in 0ms
139 timing command:install Completed in 1569ms
140 verbose stack Error: command failed
140 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
140 verbose stack at ChildProcess.emit (node:events:376:20)
140 verbose stack at maybeClose (node:internal/child_process:1063:16)
140 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:295:5)
141 verbose pkgid bluetooth-hci-socket@0.5.1
142 verbose cwd /home/olivier/Documents/TRAAK/3_PROJETS/DeepTime/test1_scan
143 verbose Linux 5.4.0-66-generic
144 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
145 verbose node v15.5.1
146 verbose npm v7.6.0
147 error code 1
148 error path /home/olivier/Documents/TRAAK/3_PROJETS/DeepTime/test1_scan/node_modules/bluetooth-hci-socket
149 error command failed
150 error command sh -c node-gyp rebuild
151 error make : on entre dans le répertoire « /home/olivier/Documents/TRAAK/3_PROJETS/DeepTime/test1_scan/node_modules/bluetooth-hci-socket/build »
151 error CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
151 error make : on quitte le répertoire « /home/olivier/Documents/TRAAK/3_PROJETS/DeepTime/test1_scan/node_modules/bluetooth-hci-socket/build »
152 error gyp info it worked if it ends with ok
152 error gyp info using node-gyp@7.1.2
152 error gyp info using node@15.5.1 | linux | x64
152 error gyp info find Python using Python version 3.8.5 found at "/usr/bin/python3"
152 error gyp WARN EACCES current user ("olivier") does not have permission to access the dev dir "/root/.cache/node-gyp/15.5.1"
152 error gyp WARN EACCES attempting to reinstall using temporary dev dir "/tmp/.node-gyp"
152 error gyp info spawn /usr/bin/python3
152 error gyp info spawn args [
152 error gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
152 error gyp info spawn args 'binding.gyp',
152 error gyp info spawn args '-f',
152 error gyp info spawn args 'make',
152 error gyp info spawn args '-I',
152 error gyp info spawn args '/home/olivier/Documents/TRAAK/3_PROJETS/DeepTime/test1_scan/node_modules/bluetooth-hci-socket/build/config.gypi',
152 error gyp info spawn args '-I',
152 error gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
152 error gyp info spawn args '-I',
152 error gyp info spawn args '/tmp/.node-gyp/15.5.1/include/node/common.gypi',
152 error gyp info spawn args '-Dlibrary=shared_library',
152 error gyp info spawn args '-Dvisibility=default',
152 error gyp info spawn args '-Dnode_root_dir=/tmp/.node-gyp/15.5.1',
152 error gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
152 error gyp info spawn args '-Dnode_lib_file=/tmp/.node-gyp/15.5.1/<(target_arch)/node.lib',
152 error gyp info spawn args '-Dmodule_root_dir=/home/olivier/Documents/TRAAK/3_PROJETS/DeepTime/test1_scan/node_modules/bluetooth-hci-socket',
152 error gyp info spawn args '-Dnode_engine=v8',
152 error gyp info spawn args '--depth=.',
152 error gyp info spawn args '--no-parallel',
152 error gyp info spawn args '--generator-output',
152 error gyp info spawn args 'build',
152 error gyp info spawn args '-Goutput_dir=.'
152 error gyp info spawn args ]
152 error gyp info spawn make
152 error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
152 error ../src/BluetoothHciSocket.cpp: In static member function ‘static void BluetoothHciSocket::Init(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’:
152 error ../src/BluetoothHciSocket.cpp:128:82: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
152 error 128 | target->Set(Nan::New("BluetoothHciSocket").ToLocalChecked(), tmpl->GetFunction());
152 error | ^
152 error In file included from /tmp/.node-gyp/15.5.1/include/node/node.h:63,
152 error from /tmp/.node-gyp/15.5.1/include/node/node_buffer.h:25,
152 error from ../src/BluetoothHciSocket.cpp:7:
152 error /tmp/.node-gyp/15.5.1/include/node/v8.h:6497:46: note: candidate: ‘v8::MaybeLocal v8::FunctionTemplate::GetFunction(v8::Local)’
152 error 6497 | V8_WARN_UNUSED_RESULT MaybeLocal GetFunction(
152 error | ^~~~~~~~~~~
152 error /tmp/.node-gyp/15.5.1/include/node/v8.h:6497:46: note: candidate expects 1 argument, 0 provided
152 error ../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’:
152 error ../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local*)’ is deprecated [-Wdeprecated-declarations]
152 error 251 | Nan::MakeCallback(Nan::New
Hello, I try to install the package via
npm install bluetooth-hci-socket
orsudo npm install bluetooth-hci-socket
, but I always get the same error (does not have permission to access the dev dir "/root/.cache/node-gyp/15.5.1").I have tried to log as root and install with
-g
but it's the same. I have already install the bluetooth stuff :sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev
Verbose output :
``` 136 info run bluetooth-hci-socket@0.5.1 install { code: 1, signal: null } 137 timing reify:rollback:createSparse Completed in 82ms 138 timing reify:rollback:retireShallow Completed in 0ms 139 timing command:install Completed in 1569ms 140 verbose stack Error: command failed 140 verbose stack at ChildProcess.Thanks in advance for any support,
Olivier