4

I'm currently trying to test several databases for an IoT application using Node-RED. To connect Node-RED with the database I wanted to use the node-red-contrib-jdbc package but the installation isn't working (tried both palette manager and manual install via terminal). The error message is posted below but I'm not sure what it's trying to tell me, anyone got an idea?

System: Ubuntu 20.04 LTS (VM)
Python: 2.7.18 and 3.8.10
Java: openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

Error Message:

> java@0.12.2 install /home/nimda/.node-red/node_modules/java                                                                                                 
> node-gyp rebuild                                                                                                                                            
                                                                                                                                                              
gyp WARN EACCES current user ("nimda") does not have permission to access the dev dir "/root/.cache/node-gyp/14.17.6"                                         
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/nimda/.node-red/node_modules/java/.node-gyp"                                           
(node:3394) UnhandledPromiseRejectionWarning: TypeError [ERR_STREAM_NULL_VALUES]: May not write null values to stream                                         
    at Socket.Writable.write (internal/streams/writable.js:272:11)                                                                                            
    at /home/nimda/.node-red/node_modules/java/findJavaHome.js:6:18                                                                                           
    at /home/nimda/.node-red/node_modules/find-java-home/dist/index.js:103:21                                                                                 
    at step (/home/nimda/.node-red/node_modules/find-java-home/dist/index.js:46:23)                                                                           
    at Object.next (/home/nimda/.node-red/node_modules/find-java-home/dist/index.js:27:53)                                                                    
    at fulfilled (/home/nimda/.node-red/node_modules/find-java-home/dist/index.js:18:58)                                                                      
(Use `node --trace-warnings ...` to show where the warning was created)                                                                                       
(node:3394) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catc
h block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unha
ndled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)                                               
(node:3394) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate t
he Node.js process with a non-zero exit code.                                                                                                                 
gyp: Call to 'node findJavaHome.js' returned exit status 0 while in binding.gyp. while trying to load binding.gyp                                             
gyp ERR! configure error                                                                                                                                      
gyp ERR! stack Error: `gyp` failed with exit code: 1                                                                                                          
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 5.11.0-34-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/nimda/.node-red/node_modules/java
gyp ERR! node -v v14.17.6
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! java@0.12.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the java@0.12.2 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/2021-09-15T14_08_09_489Z-debug.log
hardillb
  • 54,545
  • 11
  • 67
  • 105
peanut
  • 41
  • 1

0 Answers0