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

The db-oracle could be install off-line? #55

Open
poston opened this issue Jul 10, 2013 · 7 comments
Open

The db-oracle could be install off-line? #55

poston opened this issue Jul 10, 2013 · 7 comments

Comments

@poston
Copy link

poston commented Jul 10, 2013

Because the company cannot connect internet, the db-oracle how to install off-line

@johannish
Copy link

You can run npm install db-oracle.tar.gz once you have a tar.gz file. Two options come to mind to get the file, both using a box connected to the internet to download the code:

  1. do npm install db-oracle, then copy the packaged .tar.gz out of the cache directory ("~/.npm/db-oracle/0.2.3/package.tgz")
  2. clone this repository and the submodule repository, then run npm package:
$ git clone https://github.com/mariano/node-db-oracle.git
$ cd node-db-oracle
$ git submodule init && git submodule update
$ npm pack

You'll then have a "db-oracle-0.2.3.tgz" in the current directory.

@behrad
Copy link

behrad commented Jul 20, 2013

@raztus is the same working for https://github.com/nearinfinity/node-oracle?
I noticed you have been using both packages, which one do you recommand?

@johannish
Copy link

I don't have enough experience to really recommend one over the other, and we are currently using both libraries in my organization. What is clear is that mariano has ignored pull requests on this repository for at least 2 years, while joeferner has been actively accepting pull requests on his repo. Neither author is actively coding on these projects (though mariano is still active on the second part of this package, node-db).

In my private fork of node-db-oracle I have gotten it to build on Node 10 using node-gyp, and it seems to work fine. However, node-oracle has a few more features I need (TNS names, some CLOB support) and development in the forks seems a bit more active.

@behrad
Copy link

behrad commented Aug 6, 2013

@raztus I want to use your fork and edit bindings to support lnnz12
Is this the only installation method?

$ git clone https://github.com/raztus/node-db-oracle.git
$ cd node-db-oracle
$ git submodule init && git submodule update
$ npm install

but I want to add git dependency to your fork in my own npm module, what happens to submodule init && git submodule update !?
How can i use preinstall to automatically install db-oracle from your fork?

@johannish
Copy link

There have been a few attempts to do what you're asking; that is, have npm install automatically install an npm module that contains git submodulest:
https://github.com/spiralsphere/node-db-oracle/commit/e07103c1e9c7c81f49f2f258710401f04c4332cc
And more information on this approach:
http://stackoverflow.com/questions/9543701/npm-install-forked-git-with-submodule

Unfortunately, it sounds like there isn't really a good solution to do exactly what you want. Your best bet is to follow the first steps you listed (git clone, git submodule init/update, npm install) then to run npm pack to generate the file db-oracle-0.2.3.tgz. You can then put this tar file up on some server that your package will have access to, or include it in your code itself, and add it as a dependency in your package.json:

"dependencies": {
    "db-oracle": "http://mycompany.com/db-oracle-0.2.3.tgz"
}

See: https://npmjs.org/doc/json.html#URLs-as-Dependencies

@behrad
Copy link

behrad commented Aug 6, 2013

thank you @raztus for your clean answer, but that way what happens to building native packages!?

  1. do npm install in my package run npm install when using a url dependency? so that natives get built
  2. including it in my own code is not safe, so no npm install can be preformed!
  3. Spiralsphere's package.json has the dependency: https://github.com/spiralsphere/node-db-oracle/commit/e07103c1e9c7c81f49f2f258710401f04c4332cc#L0R27, but yours has not!
    This may solve the issue, since forces npm to fetch that but copying into node_modules!!!!? huh!?

@johannish
Copy link

  1. Yes, npm install will also install url dependencies, if specified in your package.json.
  2. You're right, I assumed you could do something like "db-oracle": "file://db-oracle-0.2.3.tgz", but it looks like you cannot use file://.
  3. The code at https://github.com/spiralsphere/node-db-oracle/commit/e07103c1e9c7c81f49f2f258710401f04c4332cc will not work properly. I was only presenting it as an example of what has been tried.

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

3 participants