Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues installing the oracledb driver in my node server when pushing to Heroku #1

Open
AkyunaAkish opened this issue Nov 30, 2017 · 2 comments

Comments

@AkyunaAkish
Copy link

Hi, I added the build-packs and Aptfile you mentioned in the readme.

From there I pushed to heroku with oracledb as an npm dependency("oracledb": "^1.13.1") of my node server.

I then received this error when oracledb was attempted to be installed as a dependency in the heroku environment:

Counting objects: 20, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (19/19), done.
Writing objects: 100% (20/20), 2.52 KiB | 1.26 MiB/s, done.
Total 20 (delta 10), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Node.js app detected
remote: 
remote: -----> Creating runtime environment
remote:        
remote:        NPM_CONFIG_LOGLEVEL=error
remote:        NPM_CONFIG_PRODUCTION=true
remote:        NODE_VERBOSE=false
remote:        NODE_ENV=production
remote:        NODE_MODULES_CACHE=true
remote: 
remote: -----> Installing binaries
remote:        engines.node (package.json):  unspecified
remote:        engines.npm (package.json):   unspecified (use default)
remote:        
remote:        Resolving node version 8.x...
remote:        Downloading and installing node 8.9.1...
remote:        Using default npm version: 5.5.1
remote: 
remote: -----> Restoring cache
remote:        Loading 2 from cacheDirectories (default):
remote:        - node_modules
remote:        - bower_components (not cached - skipping)
remote: 
remote: -----> Building dependencies
remote:        Installing node modules (package.json)
remote:        
remote:        > [email protected] install /tmp/build_2a4f73b4fa0b20c6adde400e272d04b0/node_modules/oracledb
remote:        > node-gyp rebuild
remote:        
remote:        node-oracledb ERR! Error: Cannot find Oracle library libclntsh.so
remote:        node-oracledb ERR! Error: See https://github.com/oracle/node-oracledb/blob/master/INSTALL.md
remote:        
remote:        gyp: Call to 'INSTURL="https://github.com/oracle/node-oracledb/blob/master/INSTALL.md"; ERR="node-oracledb ERR! Error:"; if [ -z $OCI_LIB_DIR ]; then OCI_LIB_DIR=`ls -d /usr/lib/oracle/*/client*/lib/libclntsh.* 2> /dev/null | tail -1 | sed -e 's#/libclntsh[^/]*##'`; if [ -z $OCI_LIB_DIR ]; then if [ -z "$ORACLE_HOME" ]; then if [ -f /opt/oracle/instantclient/libclntsh.so ]; then echo "/opt/oracle/instantclient/"; else echo "$ERR Cannot find Oracle library libclntsh.so" >&2; echo "$ERR See $INSTURL" >&2; echo "" >&2; fi; else if [ -f "$ORACLE_HOME/lib/libclntsh.so" ]; then echo $ORACLE_HOME/lib; else echo "$ERR Cannot find $ORACLE_HOME/lib/libclntsh.so" >&2; echo "$ERR See $INSTURL" >&2; echo "" >&2; fi; fi; else if [ -f "$OCI_LIB_DIR/libclntsh.so" ]; then echo $OCI_LIB_DIR; else echo "$ERR Cannot find $OCI_LIB_DIR/libclntsh.so" >&2; echo "$ERR See $INSTURL" >&2; echo "" >&2; fi; fi; else if [ -f "$OCI_LIB_DIR/libclntsh.so" ]; then echo $OCI_LIB_DIR; else echo "$ERR Cannot find $OCI_LIB_DIR/libclntsh.so" >&2; echo "$ERR See $INSTURL" >&2; echo "" >&2; fi; fi;' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
remote:        gyp ERR! configure error
remote:        gyp ERR! stack Error: `gyp` failed with exit code: 1
remote:        gyp ERR! stack     at ChildProcess.onCpExit (/tmp/build_2a4f73b4fa0b20c6adde400e272d04b0/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
remote:        gyp ERR! stack     at emitTwo (events.js:126:13)
remote:        gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
remote:        gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
remote:        gyp ERR! System Linux 3.13.0-133-generic
remote:        gyp ERR! command "/tmp/build_2a4f73b4fa0b20c6adde400e272d04b0/.heroku/node/bin/node" "/tmp/build_2a4f73b4fa0b20c6adde400e272d04b0/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
remote:        gyp ERR! cwd /tmp/build_2a4f73b4fa0b20c6adde400e272d04b0/node_modules/oracledb
remote:        gyp ERR! node -v v8.9.1
remote:        gyp ERR! node-gyp -v v3.6.2
remote:        gyp ERR! not ok
remote:        npm ERR! code ELIFECYCLE
remote:        npm ERR! errno 1
remote:        npm ERR! [email protected] install: `node-gyp rebuild`
remote:        npm ERR! Exit status 1
remote:        npm ERR!
remote:        npm ERR! Failed at the [email protected] install script.
remote:        npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:        
remote:        npm ERR! A complete log of this run can be found in:
remote:        npm ERR!     /app/.npm/_logs/2017-11-30T17_23_56_759Z-debug.log
remote: 
remote: -----> Build failed
remote:        
remote:        We're sorry this build is failing! You can troubleshoot common issues here:
remote:        https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:        
remote:        Some possible problems:
remote:        
remote:        - Node version not specified in package.json
remote:        https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
remote:        
remote:        Love,
remote:        Heroku
remote:        
remote:  !     Push rejected, failed to compile Node.js app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !	Push rejected to apdp-web-app.
remote: 
To https://git.heroku.com/apdp-web-app.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/apdp-web-app.git'

Maybe I'm misunderstanding what your build-pack is doing, I thought it would set up the packages in the Heroku file system to support the oracledb npm package's installation.


Stack Overflow question I asked about this problem:

https://stackoverflow.com/questions/47561486/how-can-i-install-the-oracledb-npm-package-on-a-heroku-nodejs-server

Any insight would be appreciated, thanks

@AkyunaAkish
Copy link
Author

I was able to get it working using one of the forks made of this repo. Described in the answer here: https://stackoverflow.com/questions/47561486/how-can-i-install-the-oracledb-npm-package-on-a-heroku-nodejs-server/47780428#47780428

@MichaelBuhler
Copy link
Owner

Thanks for following up and thank to @pupostd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants