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

compile --native and pm2 support #784

Closed
giulianoz opened this issue Jan 18, 2016 · 7 comments
Closed

compile --native and pm2 support #784

giulianoz opened this issue Jan 18, 2016 · 7 comments

Comments

@giulianoz
Copy link

Hi,
I'm trying to compile a native application on centos 64bit with library=false and then run it under pm2.
As now I have only been able to run the non native version (jx myapp.jx), while the native versin throws this error
module.js:1117
throw f + ' can not be embedded into another project. ' +

Anyway, I've tried to run the jx my_app.jx command under pm2 but I have no idea if it's supported or not.
this is my pm2 json definition for the application

{
"apps" : [
{
"name" : "my_app",
"script" : "/usr/local/bin/js /opt/my_app/my_app.jx",
"args" : [],
"watch" : true,
"merge_logs" : true,
"cwd" : "/opt/my_app",
"max_memory_restart" : "200M"
}
]
}

Any help will be greatly appreciated :)

TIA

g

@ktrzeciaknubisa
Copy link
Member

Hi @giulianoz I understand, that if you run your native ./myApp app directly, then it runs right?

@giulianoz
Copy link
Author

Hi,
if I run "jx my_app.jx" it runs fine, but if I run "./my_app" i get the error:

module.js:1117
throw f + ' can not be embedded into another project. ' +

About the pm2 question I've added
"exec_interpreter":"/usr/local/bin/jx" to the json file and everything seems to work fine

g

@ktrzeciaknubisa
Copy link
Member

Yes, I see it too. Look's like --native && --library false does not go along for some reason. I'm going to check that.

@giulianoz
Copy link
Author

thanks !

2016-01-18 17:00 GMT+01:00 Krzysztof Trzeciak notifications@github.com:

Yes, I see it too. Look's like --native && --library false does not go
along for some reason. I'm going to check that.


Reply to this email directly or view it on GitHub
#784 (comment).

Giuliano Zorzi | Technical Support
E-mail: g.zorzi@sosoftware.com

SoLo: +39 0461 710 732

SoSoftware SA | Ch. Renou 2, 1005 Lausanne, Switzerland
Tel. +41 (0)216437766 | Fax. +41 (0)216437765

@ktrzeciaknubisa
Copy link
Member

No problem. Until then you have two options if you want to use them: either do not set --library false for native package or use jx package (non-native).

@ktrzeciaknubisa
Copy link
Member

It looks like setting --library false for native packages is pointless anyway. Probably we should ignore it's value for native packages (I mean to treat as true), @obastemur ?

@giulianoz What are you expecting to achieve by setting --library false for native package? It prevents require('./myApp.jx') usage but that applies only for jx packages. Maybe you're expecting a different behavior?

@ktrzeciaknubisa
Copy link
Member

@giulianoz Starting from 0.3.1.1 library = false is ignored for native packages. You will also receive a warning if you try to create a native package with that value.

Aside from that I didn't see any problem when running native package under pm2.

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

2 participants