Closed arnaudchenyensu closed 7 years ago
If you use evaluation version, then you may probably have this issue. Evaluation version has network-related limitations. Your application will be not able to use network after some time passes. Please ignore this problem while using evaluation version.
I was not using the evaluation version but for some reason now I got this error when I launch the app:
undefined:0
Error: Cannot find module './dialects/postgres/index.js'
at Error (native)
at P (e:0)
at f (e:0)
at Knex (e:0)
at Object.console.+/+t+h+e+b+o+x+/+u+s+r+/+l+o+c+a+l+/app/+m+o+d+e+l+s+/+u+t+i+l+s+.+j+s.dev (e:0)
at r (e:0)
at P (e:0)
at f (e:0)
at Object.console.+/+t+h+e+b+o+x+/+u+s+r+/+l+o+c+a+l+app/+m+o+d+e+l+s+/+u+s+e+r+.+j+s.dev (e:0)
at r (e:0)
at P (e:0)
at f (e:0)
at Object.console.+/+t+h+e+b+o+x+/+u+s+r+/+l+o+c+a+l+/+app/+a+u+t+h+.+j+s.dev (e:0)
at r (e:0)
at P (e:0)
at f (e:0)
I solved my issue by installing the package pg-query-stream
npm install pg-query-stream
I then created a config file for enclose:
module.exports = {
scripts: "./node_modules/knex/lib/dialects/postgres/index.js"
};
And then run enclose with the option -c config.js
. Note: config.js
can only have enclosejs
options (you can't use a global config.js
with the config of your app AND enclosejs
).
Also, I think it should be interesting to indicate the option -c
in the wiki under the section Explicit packaging
. Actually, I don't even know where to find enclosejs
options except by running enclose
.
I have made some adjustments for knex
in 2.1.0. Please reinstall enclose and try again.
Dear users of EncloseJS! I highly encourage you to switch to https://github.com/zeit/pkg It is rewritten successor of EncloseJS. It is open source, and all improvements will go there. Please check if pkg has your issue unresolved, and if it is true, reopen your issue there: https://github.com/zeit/pkg/issues
Hi,
I'm currently working with the package knex.js, but when running the executable of my app (Linux machine) I got this error:
But my app is working perfectly fine when using
node index.js
.Update
Here the errors I got when compiling:
Is there an easy way to fix those errors without modifying knex.js code?