Node-oracledb: 'NJS-054: Binary build/Release/oracledb.node was not installed' on AWS for Node 8

Created on 18 Jan 2018  路  9Comments  路  Source: oracle/node-oracledb

ENV Detail:
AWS Linux Image
NodeJS: 8.9.4
OracleDB: 2.0.15

ERROR uncaughtException: NJS-045: cannot load the oracledb add-on binary for Node.js 8.9.4 (linux, x64)
Cannot find module node_modules/oracledb/build/Release/oracledb.node

OracleDB Node module installation works fine if I use NodeJS 6.10.2 version

install & configuration

Most helpful comment

@cjbj there is no issue with permission - I doubled check along with our Linux administrator

I solved this issue by installing this module with below command
npm install -oracledb --unsafe-perm=true --allow-root

Below link talks about similar permission issue in elm and some suggestions how to solve it
https://github.com/elm-lang/elm-platform/issues/218

All 9 comments

https://github.com/oracle/node-oracledb/issues/827

Try the solution mentioned in this link

@dparmar74 Did oracledb.node get installed somewhere else? What was in the output of 'npm install'?

I've come across NJS-045 when using sym links for my app files.

Here is the npm output. I ran this command as "root" which should have necessary permission to create "build" directory

oracledb Beginning installation
oracledb Verifying installation
oracledb Binary not found
oracledb Continuing installation
oracledb ^[[31mERR!^[[0m NJS-054: Binary build/Release/oracledb.node was not installed from oracledb-v2.0.15-node-v57-linux-x64.gz
oracledb ^[[31mERR!^[[0m EACCES: permission denied, mkdir 'build'
oracledb ^[[31mERR!^[[0m If the error is not network or filesystem related, then review
oracledb ^[[31mERR!^[[0m the Python 2.7 and compiler prerequisites in the installation instructions and
oracledb ^[[31mERR!^[[0m then install from source code with: npm install oracle/node-oracledb.git#v2.0.15
oracledb ^[[31mERR!^[[0m See https://github.com/oracle/node-oracledb/blob/master/INSTALL.md

@dparmar74 Could you please show us the exact command you ran?

This looks suspicious

EACCES: permission denied, mkdir 'build'

Do you need to be a privileged user

I login as a "root" user to AWS Ec2 machine after setting node in path. I type
"npm install oracledb"

I don't get this error with Node 6.10.2 version. Here is the output

oracledb Beginning installation
oracledb Verifying installation
oracledb Binary not found
oracledb Continuing installation
oracledb Oracledb installed
oracledb Verifying installation
oracledb Binary SHA matches SHA in SHASUMS256.txt
oracledb
oracledb *************************
oracledb *
Node-oracledb 2.0.15 installation complete for Node.js 6.10.2 (linux, x64)
oracledb *
oracledb *
To use the installed node-oracledb:
oracledb * - You must have 64-bit Oracle client libraries in LD_LIBRARY_PATH, or configured with ldconfig
oracledb *
- If you do not already have libraries, install the Instant Client Basic or Basic Light package from
oracledb * http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
oracledb *

oracledb * Node-oracledb installation instructions: https://github.com/oracle/node-oracledb/blob/master/INSTALL.md
oracledb
*************************

芒芒芒 [email protected]

@dparmar74 do some investigation on the access issue for the 'build' directory. This is likely a permission problem on your machine. This is the code that is being run; it is identical for both Node versions you used.

Before you run 'npm install', execute export NODE_ORACLEDB_TRACE_INSTALL=TRUE, though that is unlikely to show more about this particular problem.

@cjbj there is no issue with permission - I doubled check along with our Linux administrator

I solved this issue by installing this module with below command
npm install -oracledb --unsafe-perm=true --allow-root

Below link talks about similar permission issue in elm and some suggestions how to solve it
https://github.com/elm-lang/elm-platform/issues/218

@dparmar74 thanks for digging into this and posting the solution for AWS. Yay!

I'll close this out.

Was this page helpful?
0 / 5 - 0 ratings