Closed kredmer closed 9 years ago
The path is spoiled intentionally. thebox
is added to signal you that you require
your submodule in some unusual way - probably using __dirname
. And your submodule was not taken into the package at compile-time. How did you require
your module? Please show that part of your code.
global.base = dirname + '/' config = require(__base+'sqlconfig.js')
sqlconfig.js is the problem
EncloseJS parses your code and __base+'sqlconfig.js'
is too difficult to understand what file to take in package. EncloseJS requires a simple string literal like require('./sqlconfig.js')
. Also, there is another way - use config file and specify it in command line. Example: https://github.com/igorklopov/enclose/tree/master/examples/31-scripts
I got this....but now I have problems with express....
dbp is not defined
at
I made a simple project using express, compiled it and it works fine. Also, i did not find module dpb
in express (that you mention). Could you find what means dpb
, where it is, and how it is used. Maybe this is some kind of handler, that is called from express/lib/router/route.js
Hope you have solved your problems. Reopen otherwise.
I tried: enclose server.js
then I have a new file server which I can execute:
./server
Result:
fs.js:502 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); ^ Error: ENOENT, no such file or directory '/thebox/then/my/path/and/another.js'
My path is prefixed with /thebox/ !
Thanks, Karsten