-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
yarn install from github not working (v2.0-dev not compiling, needed for LONG RAW.) #794
Comments
Indeed the link provided is broken, and the link to the documentation is for the master branch (which is still v1). I'm sure @cjbj will correct those shortly. In the meantime you can get ODPI-C from here. Or, if you want to use git, you can do the following:
That should get you going! I can't speak for everyone on the team but I strongly doubt that we will add support for long raw in the v1 stream. The v2 branch is almost ready for a production release and is to be preferred. If you have any difficulties with using it, please let us know! Thanks. |
Thank you @anthony-tuininga. I'd definitely prefer to use v2.0. I think I will need to integrate the following into a pre or post-install step in my package.json.
Running this manually does seem to be working very nicely. Thank you! |
For completeness, postinstall script is here:
#!/usr/bin/env node
let fs = require('fs');
let child_process = require('child_process');
try {
console.log('Running postinstall script...');
process.chdir('./node_modules');
let exists = fs.existsSync('./oracledb');
//console.info('oracle db exists: ' + exists);
if (exists) {
// go into the directory, update and install again
console.info('update from github');
process.chdir('./oracledb');
child_process.execSync('git pull');
}
else {
console.info('check out from github');
child_process.execSync('git clone https://github.com/oracle/node-oracledb.git');
child_process.execSync('mv node-oracledb oracledb');
process.chdir('./oracledb');
child_process.execSync('git checkout dev-2.0');
child_process.execSync('git submodule init'); // only needed the first time
}
child_process.execSync('git submodule update');
console.info('installing...');
child_process.exec('npm install', (err) => {
if (err) {
console.error('error during install: ' + err.message);
}
else {
console.info('postinstall complete.');
}
});
}
catch (error) {
console.error('\n\x1b[41mError:\x1b[0m Could not complete the postinstall script.');
return;
} and in {
"scripts": {
"postinstall": "node scripts/postinstall.js"
}
}
|
Thanks. FYI, the command "git submodule init" is only required the first time. |
I updated that last comment to put the |
Unless you're modifying node-oracledb code, just install it from the branch with See #716 |
@cjbj unfortunately that was not working due to errors in building due to the |
@pgkehle can you test again? The command |
OK, I'm sorry for the confusion here.
But, we are using
error .../node_modules/oracledb: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: .../node_modules/oracledb
Output:
node-oracledb ERR! Error: Cannot find odpi/include/dpi.h. For GitHub ZIP downloads you must separately download the odpi subdirectory from GitHub.
node-oracledb ERR! Error: See https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#github
gyp: Call to 'INSTURL="https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#github"; ERR="node-oracledb ERR! Error:"; if [ -f odpi/include/dpi.h ]; then echo "Has dpi.h"; else echo "$ERR Cannot find odpi/include/dpi.h. For GitHub ZIP downloads you must separately download the odpi subdirectory from GitHub." >&2; echo "$ERR See $INSTURL" >&2; echo "" >&2; fi;' 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/local/lib/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 17.2.0
gyp ERR! command "/usr/local/Cellar/node/8.9.1/bin/node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd .../node_modules/oracledb So maybe the real issue is to get this build process to work with |
@pgkehle thanks for the confirmation. I'll change this to an enhancement request. Hopefully you will be submitting a PR soon?! |
This seems to be a common issue with yarn: yarnpkg/yarn#1488 |
@cjbj Do you see any workarounds? ie: will this be something that can be integrated directly into the packages rather than as a submodule? |
Copying the odpi code into the node-oracledb repo is ugly. Maybe you can stir up the yarn bug at bit? Or maybe you can stage your own node-oracledb bundle on your own webserver? The big question is whether yarn will cope with the future two-step install process to automatically download pre-built binaries, see #18 (comment). The |
@pgkehle have you tested with the pre-built binaries, using |
@pgkehle another thing, I noticed that older npm's (e.g. with Node 4) also had issues pulling odpi for |
@cjbj Yes, this is working for us. Thank you! 👍 |
@pgkehle which one worked - oracledb@dev or the URL? |
@cjbj |
@pgkehle nice. And the prod release is coming soon. I'll close this out now. |
@pgkehle the production release is out, as you may have seen: https://blogs.oracle.com/opal/node-oracledb-20-with-pre-built-binaries-is-on-npm |
Yes I did see it. Thank you. We have updated our build process to use the standard Thank you so much for handling this! |
Answer the following questions:
v8.9.1
v2.0-dev
v12.2
/opt/oracle/instantclient
Not there yet
Ubuntu 16.04.3 LTS
MacOS 10.13.1 (17B48)
gcc --version
On linux:
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609
On MacOS:
Apple LLVM version 9.0.0 (clang-900.0.38)
Target: x86_64-apple-darwin17.2.0
Nothing in particular
I am trying to get LONG RAW support. I submitted a PR that was accepted for strong-oracle, and now want to switch over to this native driver. I started a branch to attempt to shoe-horn in a read-only option in the v1 branch (
killed). This was due the v2.0-dev branch not compiling, since it is unclear where we should manually export theodpi
folder. I just noticed a comment in the INSTALL.md file fordev-2.0
:The package URL referenced gives a 404.
Resolution Requests
I see
twoone option:dev-2.0
branch. Be specific in how to install along side the instantclient.The text was updated successfully, but these errors were encountered: