abandonware / node-bluetooth-hci-socket

MIT License
42 stars 47 forks source link

Error when installing!! #15

Closed matcik890 closed 4 years ago

matcik890 commented 4 years ago

Ask for help. I can't install this function. Mistake..

pi@raspberrypi:~ $ npm install @abandonware / bluetooth-HCI-socket npm ERR! code EINVALIDTAGNAME npm ERR! Invalid tag name "@abandonware": Tags may not have any characters that encodeURIComponent encodes.

npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2020-05-31T17_24_24_678Z-debug.log pi@raspberrypi:~ $

rzr commented 4 years ago

hi try:

npm install @abandonware/bluetooth-hci-socket
# + @abandonware/bluetooth-hci-socket@0.5.3-5

was it badly documented anywhere ?

matcik890 commented 4 years ago

привет попробуйте:

npm install @abandonware/bluetooth-hci-socket
# + @abandonware/bluetooth-hci-socket@0.5.3-5

это было плохо задокументировано где-нибудь ?

Salute! Is this related to the Node js version 12.17.0?

matcik890 commented 4 years ago

pi@raspberrypi:~ $ sudo npm install @abandonware/bluetooth-hci-socket # + @abandonware/bluetooth-hci-socket@0.5.3-5

@abandonware/bluetooth-hci-socket@0.5.3-5 install /home/pi/node_modules/@abandonware/bluetooth-hci-socket node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp WARN Pre-built binaries not installable for @abandonware/bluetooth-hci-socket@0.5.3-5 and node@12.17.0 (node-v72 ABI, glibc) (falling back to source compile with node-gyp) node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding' gyp WARN EACCES current user ("pi") does not have permission to access the dev dir "/root/.cache/node-gyp/12.17.0" gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/pi/node_modules/@abandonware/bluetooth-hci-socket/.node-gyp" gyp WARN install got an error, rolling back install gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/pi/node_modules/@abandonware/bluetooth-hci-socket/.node-gyp' gyp ERR! System Linux 4.19.118-v7l+ gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/binding.node" "--module_name=binding" "--module_path=/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72" "--python=/path/to/executable/python" gyp ERR! cwd /home/pi/node_modules/@abandonware/bluetooth-hci-socket gyp ERR! node -v v12.17.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/binding.node --module_name=binding --module_path=/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72 --python=/path/to/executable/python' (1) node-pre-gyp ERR! stack at ChildProcess. (/home/pi/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) node-pre-gyp ERR! System Linux 4.19.118-v7l+ node-pre-gyp ERR! command "/usr/bin/node" "/home/pi/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /home/pi/node_modules/@abandonware/bluetooth-hci-socket node-pre-gyp ERR! node -v v12.17.0 node-pre-gyp ERR! node-pre-gyp -v v0.14.0 node-pre-gyp ERR! not ok Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/binding.node --module_name=binding --module_path=/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72 --python=/path/to/executable/python' (1) npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json' npm WARN pi No description npm WARN pi No repository field. npm WARN pi No README data npm WARN pi No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xpc-connection@0.1.4 (node_modules/xpc-connection): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for xpc-connection@0.1.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) not coming out again! npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @abandonware/bluetooth-hci-socket@0.5.3-5 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @abandonware/bluetooth-hci-socket@0.5.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! /root/.npm/_logs/2020-05-31T18_01_01_279Z-debug.log

rzr commented 4 years ago

why using sudo ?

matcik890 commented 4 years ago

Sud sudo issues an error. I don't understand what the problem is Pi @ RaspberryPi: ~ $ npm install @ abandonware / Bluetooth-HCI-Socket # + @abandonware/bluetooth-hci-socket@0.5.3-5 npm ERR! EINVALIDTAGNAME code npm ERR! Invalid tag name "@abandonware": tags may not contain characters encoded by encodeURIComponent.

npm ERR! The full log of this launch can be found in the section: npm ERR! /home / IE/.npm/_logs/2020-05-31T18_10_01_163Z-debugging.log

rzr commented 4 years ago

just avoid spaces in package name

matcik890 commented 4 years ago

npm install @abandonware/bluetooth-hci-socket@0.5.3-5 npm WARN checkPermissions Missing write access to /home/pi/node_modules npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json' npm WARN pi No description npm WARN pi No repository field. npm WARN pi No README data npm WARN pi No license field.

npm ERR! path /home/pi/node_modules npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error: EACCES: permission denied, access '/home/pi/node_modules' npm ERR! { [Error: EACCES: permission denied, access '/home/pi/node_modules'] npm ERR! stack: npm ERR! 'Error: EACCES: permission denied, access \'/home/pi/node_modules\'', npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/home/pi/node_modules' } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2020-05-31T18_56_47_352Z-debug.log

matcik890 commented 4 years ago

am I doing something wrong?

rzr commented 4 years ago

npm ERR! Error: EACCES: permission denied, access '/home/pi/node_modules'

sudo mv  '/home/pi/node_modules'  '/home/pi/node_modules.bak'
matcik890 commented 4 years ago

Thank you very much friend! After this command, the installation was completed without errors!)

rzr commented 4 years ago

ok enjoy !