Giter Site home page Giter Site logo

cannot find module about node-java HOT 12 CLOSED

joeferner avatar joeferner commented on June 29, 2024
cannot find module

from node-java.

Comments (12)

erizoy avatar erizoy commented on June 29, 2024 1

When I build my project with electron-packager, on Windows Server 2008 x64, I'm getting working application, but when I'm trying to run this app on another machine (Windows 7 x64), I get error:
error
What can I do wrong?
JAVA_HOME is setup correctly on both machines.

from node-java.

joeferner avatar joeferner commented on June 29, 2024

Looks like it didn't compile the native module. Can you run "npm install" from the root of your node-java directory. If "npm install" fails can you run "node-gyp -v configure build" also from the root of the node-java directory (you may need to install node-gyp "npm install node-gyp -g") to get better debugging output.

from node-java.

joeferner avatar joeferner commented on June 29, 2024

Looks like this fixed it on another issue that was similar: Can you check your path to see if it contains something like "C:\Program Files (x86)\Java\jdk1.6.0_18\jre\bin\client". I just updated the readme. It looks like the path to jvm.dll must be in your path.

from node-java.

NisansaDdS avatar NisansaDdS commented on June 29, 2024

I got the same error.
I checked my JAVA_HOME and the jvm.dll is there.

java node

from node-java.

futurechan avatar futurechan commented on June 29, 2024

I'm having this same issue. My JAVA_HOME is setup correctly and the path to jvm.dll is in my PATH variable.

from node-java.

jtblin avatar jtblin commented on June 29, 2024

I was having the same problem, turns out the binding was created in the Debug folder instead of Release hence why node cannot find it. I tried rebuilding the module but same problem, seems related to nodejs/node-gyp#96 (node-gyp always build debug rather that release).

from node-java.

jsdevel avatar jsdevel commented on June 29, 2024

@limaologic @NisansaDdS @futurechan @jtblin can you try with the latest?

from node-java.

jsdevel avatar jsdevel commented on June 29, 2024

@limaologic @NisansaDdS @futurechan @jtblin I'm going to close this out for now. If this still affects you please reopen. Thanks!

from node-java.

tdprogrammer avatar tdprogrammer commented on June 29, 2024

getting error:
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT

I am trying to install node-java (npm install java) with no success.
I have working well, gives correct Python detail, i am usiing 2.7
I have working well, gives correct java path, i am using jdk7 32bit on windows

to test, i tried installing node-gyp which installs without error (couple of warnings)
When I try to install java (npm install java) then it fails with the error spawn ENONET

As mentioned in comments above @joeferner I tried <node-gyp -v configure build> and it gave me the same error
image

I cant figure out what else I am missing in my configuration.

from node-java.

antoinepairet avatar antoinepairet commented on June 29, 2024

@erizoy Did you find a solution?
I am having the same issue when I try to distribute an electron application using node-java

from node-java.

coco-napky avatar coco-napky commented on June 29, 2024

Any update on this?

from node-java.

jmrama avatar jmrama commented on June 29, 2024

One hint that could be the reason of this problem.

After building the project with electron-packager, when I search under "node_modules\java" folder, I've found more then 500 references, with the absolute path to the folder where I have the program and to the folder where global libraries installed on my computer.
I've installed some global libraries to run this project, but on the java.node under "node_modules\java\bin\win32-x64-53", thereโ€™s configured the same absolute path to load the file "nodejavabridge_bindings.pdb".

Can someone verify if this effect is also happening on your project? I've detected this issue after building the "binding.sln" under "node_modules\java\build".
Thanks.

UPDATE:
On the following file:
resources\app\node_modules\java\build\jvm_dll_path.json

Is hardcoded the path to where I have my "jre\bin\server".
On the target machine, if I switch this path to the correct one, I was able to lunch the program without the error message.

from node-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.