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

"It should match the enclosed Node.js runtime version of the compiler." #27

Closed
maximumdata opened this issue May 5, 2017 · 13 comments
Closed

Comments

@maximumdata
Copy link

maximumdata commented May 5, 2017

Just tried this out using the example provided by the CLI, and got this output:

Node.js Compiler (nodec) v0.9.5 (runtime 7.7.3)

It should match the enclosed Node.js runtime version of the compiler.
Expecting v7.7.3; yet got v7.8.0.

Obviously, my local version of node is 7.8.0. Does this mean I need to downgrade to 7.7.3 to use this tool? If so, this is not mentioned anywhere in the README.

@pmq20
Copy link
Owner

pmq20 commented May 5, 2017

It does not seem to be a strict requirement. I'll upgrade the runtime to the latest 7.9.0 and consider changing this to a warning this weekend.

@jerson
Copy link

jerson commented May 6, 2017

maybe v7.10.0 :)

pmq20 added a commit that referenced this issue May 6, 2017
@pmq20
Copy link
Owner

pmq20 commented May 6, 2017

@jerson Thanks for pointing it out :) Landed v7.10.0 in 68ddd9c

Let's wait for the CI and I'll release nodec v0.9.6 once they are all green.

@pmq20
Copy link
Owner

pmq20 commented May 8, 2017

Node.js Compiler v0.9.6 (runtime 7.10.0) released! @maximumdata Please check if it solves your problem, thanks!

https://github.com/pmq20/node-compiler/releases/tag/v0.9.6

@goforward01
Copy link

goforward01 commented May 11, 2017

Hi, @pmq20 .For some reason, I used nodejs of version 6.10.3, the Latest LTS Version of nodejs. Uh, actually the grpc module and protobuffer are quite strict about the nodejs version, so I'm wondering whether there are some other ways for node compiler to assign the version of nodejs.

@goforward01
Copy link

@pmq20, Uh, I just used node compiler to build my project, while as said before I used grpc in my project. After couples of minutes, the compile job is done and of course, I get the a.out. but it can't work, just like pkg, the other tool to bundle the nodejs application. The error result looks like:

module.js:598
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: /__enclose_io_memfs__/node_modules/grpc/src/node/extension_binary/grpc_node.node: cannot open shared object file: No such file or directory
    at Object.Module._extensions..node (module.js:598:18)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/__enclose_io_memfs__/node_modules/grpc/src/node/src/grpc_extension.js:38:15)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)

Maybe, node compiler has issue with the addons of nodejs, are there any suggestions about solving this problem?

@pmq20
Copy link
Owner

pmq20 commented May 11, 2017

@goforward01 Thanks for the feedbacks. You have mentioned two problems,

  1. One is the problem of binding nodec with a particular node runtime version. I believe the correct way to solve this is to make it available for the user to choose a runtime version (or read from the environment to determine her current used node version) and nodec shall download the source code for her and apply the patch ( the patch is very small so I am confident it should work across different node versions, most of the work being done by libsquash ).
  2. The other problem is similar to Error when using with with uws #29 and Are Native modules supported. #25

Since Problem Two has been raised at least three times, I'll start working on it right away. For Problem One I'll come back to it later. Stay tuned 😆

@goforward01
Copy link

@pmq20 ,Thanks for rapid reply. btw, nice job with node compiler project. And I'll keep an eye on it later on. Really excited about being able to compile node application to single runnable file, and taking times to make it better surely be a worthy thing to do. thxs for excellent work of this project.

@pmq20
Copy link
Owner

pmq20 commented Jun 5, 2017

@goforward01 Node.js Compiler v1.0.0 released! Native C++ modules are fully supported now.

https://github.com/pmq20/node-compiler/releases/tag/v1.0.0

@goforward01
Copy link

@pmq20 Wow,that's awesome! I'll try it in a moment. Thanks for informing me, and also thanks for the excellent work with node-compiler.

@goforward01
Copy link

@pmq20 , Hi, I gave a try to use v1.0.0, and it work fine with everything, while for some reasons I have to use the [email protected], but I found the node version at default is v8.0.0, as show below:

./nodec --node-version
Node.js Compiler (nodec) v1.0.0 (runtime 8.0.0)

8.0.0

and my nodejs version is the LTS version of v6.10.3.So when I finished my compile process, of course, I got a.out file.While without luck, it reminded me I shouldn't use v8.0.0 to compile my grpc module.

module.js:598
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: The module '/__enclose_io_memfs__/node_modules/grpc/src/node/extension_binary/grpc_node.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (module.js:598:18)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/__enclose_io_memfs__/node_modules/grpc/src/node/src/grpc_extension.js:38:15)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)

Uh, Is there anyway to used the specially appointed version of nodejs before compile the pro?

@pmq20
Copy link
Owner

pmq20 commented Jun 7, 2017

@goforward01 I think this is the same issue with #40 where @lexor90 has detailed proposal regarding supporting arbitrary node.js runtime versions. Let's discuss it there.

@lexor90
Copy link
Collaborator

lexor90 commented Jun 14, 2017

Closing, let's talk to the referenced issue. Feel free to open it again should you need it.

@lexor90 lexor90 closed this as completed Jun 14, 2017
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

5 participants