Skip to content

Does the release App also have runtime environment requirements #756

Closed
@cuiyueshuai

Description

@cuiyueshuai

I have install all oracledb development environment in the my windows machine, and I run 'npm install oracledb' in the my electron's project, make it's work success, so I package my project, and generate a application, but when the application was installed to new machine, the new machine hava not development environment , it's not work.

but the application was installed to my development machine, it's can work success. so I run 'npm uninstall oracledb' in the my electron's project, and I package my project again and install into several new machine, then the application is work success in the all machine.

so, does the release App also have runtime environment requirements?

my English is poor, please forgive me, do you understand my means

The development environment.
Node version: 8.3.0
NPM version: 5.3.0
python version: 2.7
visual c++ build tools version: 2015
Operating System: Windows 64-bit enterprise

Activity

dmcghan

dmcghan commented on Aug 31, 2017

@dmcghan

@cuiyueshuai How are you planning on protecting database credentials in the Electron app? I'm not saying it's not possible, but I haven't thought of a way to do it (haven't spent a lot of time thinking about it).

I recommend you create a REST API using a single application server. Then your Electron applications can consume that and you don't have to worry about driver installs or credential management at the client level.

Have a look at this for ideas:
https://www.youtube.com/watch?v=hQgw2WmyuFM

cjbj

cjbj commented on Aug 31, 2017

@cjbj
Member

then the application is work success in the all machine.

If you have the node-oracledb binary built and want to copyt it to other machines, those machines must have the same OS and have the same Node/Electron version. You also need Instant Client and the VS Redistributables (for Windows) on those machines.

If you are rebuilding the node-oracledb binary, then you need the prerequisites given in the install guide.

I don't see much difference for credential management with REST and node-oracledb: something at the app layer needs to authenticate so it can do data manipulation. With node-oracledb you can use wallets, for example, to help manage this.

cuiyueshuai

cuiyueshuai commented on Sep 3, 2017

@cuiyueshuai
Author

@dmcghan , your idea is also a method what can solve the problem, but I now don't change the my project in the current version, it's my work of compony, and I don't study the knowledge about the REST API, thank you, @dmcghan , I will thank about you idea in next version problem.

@cjbj I thank you don't understand my mean, I get a installation package after that I package electron project, then I install the application in the other machine, it can install successfully, but it show a blank screen when I open the application, it isn't work , so now I thank that I has error in the packaging process, I used the electron-vue from https://github.com/SimulatedGREG/electron-vue, it package the project with Webpack, now I thank the Webpack is don't package the native module successfully, now I and other company is solving the problem, if you can speak Chinese, you can watch https://segmentfault.com/q/1010000010951974?_ea=2473239, or you and dmcghan have better advice.

I from china , thank very much @cjbj and @dmcghan can forgive my poor english, I will Learn English well as soon as possible

cjbj

cjbj commented on Sep 3, 2017

@cjbj
Member

@cuiyueshuai Since I don't have a direct solution, my answer is still the same. You need to make sure the node-oracledb binary is built again or copied. The target machines need Oracle client libraries and the matching VS Redistributable (if they are Windows machines). Remember that you can't copy the node-oracledb binary from Windows to Linux (for example). Let us know your solution.

llwslc

llwslc commented on Sep 4, 2017

@llwslc

The error is node-loader in electron-vue template .

https://github.com/SimulatedGREG/electron-vue/blob/a01d4d68edff32c432273320f7df716234f56146/template/.electron-vue/webpack.main.config.js#L39

{
        test: /\.node$/,
        use: 'node-loader'
}

The node-loader just get the .node file absolute path, like 'c:/users/llwslc/my-project/node_modules/oracledb/build/release/oracledb.node', not copy to the webpack dist dir, so target machines can't find the binary file.

My template electron-webpack solved the problem, it's not using webpack in node_modules.

or we can commit the copy binary code to node-loader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @cjbj@dmcghan@llwslc@cuiyueshuai

        Issue actions

          Does the release App also have runtime environment requirements · Issue #756 · oracle/node-oracledb