2
votes

When I compile code with

\> jx package bin/www.js myApp

\> packaging...
\> [OK] compiled file is ready (myApp.jx)

it successfully created myApp.jx and myApp.jxp But when I executed command

\> jx myApp.jx
It gives errors as:

C:\**\node_modules\express-session\node_modules\debug*node.js.jx*:72 exports.formatters.o = function(v) { ^ TypeError: Cannot set property 'o' of undefined at Object. (C:\**\node_modules\express-session\node_modules\debug\node.js.jx:72:22)
at Module._compile (module.js:519:26)
at Object.Module._extensions..jx (module.js:1604:7)
at Module.load (module.js:346:36)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:378:17)
at require (module.js:396:17)
at Object. (C:\**\node_modules\express-session*index.js.jx:17:13*)
at Module._compile (module.js:519:26)
at Object.Module._extensions..jx (module.js:1604:7)
at Module.load (module.js:346:36)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:378:17)
at require (module.js:396:17)
at Object. (C:\***server.js.jx*:7:15)
at Module._compile (module.js:519:26)

2
does the app work unpacked (jx bin/www.js) ?. Also, did you see any warnings (about native files) during package creation?infografnet
works with jx bin/www.jsChaitanya Joshi
with errors as > { [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }Chaitanya Joshi
So the same error, huh? Then you can check if the same works with node. Because if it isn't - that not a JXcore issue.infografnet
Yeah, you are right, it may be npm module issues.Chaitanya Joshi

2 Answers

1
votes

I dont think,the problem is with NPM, step by step compile each of the .js file, and introduce required NPM package one by one , you will get the solution.

1
votes

Since it is not a JXcore issue (the app fails with node too), you might want to seek the problem related with js-bson: Failed to load c++ bson extension, using pure JS version.

For example I saw this answer: Failed to load c++ bson extension, and they say it could be fixed by reinstalling modules with npm install.