-
Notifications
You must be signed in to change notification settings - Fork 368
[BUG] when using express in electron : ReferenceError: self is not defined #195
Comments
Probably because of this line https://github.com/google/lovefield/blob/master/dist/lovefield.js#L1. |
exactly. is there any solution out there ?
…On Fri, Feb 17, 2017 at 1:12 AM freshp86 ***@***.***> wrote:
Probably because of this line
https://github.com/google/lovefield/blob/master/dist/lovefield.js#L1.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#195 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQ-rrC_BLLCcN_uZGDBOvVhagHeJ03_Zks5rdNfFgaJpZM4MDqhZ>
.
|
Does it work if you wrap it with a try catch?
I don't have an dummy electron project to try this (nor have I ever used it). Perhaps we could add a dummy electron demo under demos/ so that it is easier to catch those errors. |
the problem is not with electron. its with express in electron. tried using
lovefield in electron w/o express and it works great. when i implement
express then i get this error
…On Fri, Feb 17, 2017 at 1:25 AM freshp86 ***@***.***> wrote:
Does it work if you wrap it with a try catch?
try {
if(!self.window){window=self;}
} catch(e) { // do nothing }
I don't have an easy electron project to start this (nor have I ever used
it). Perhaps we could add a dummy electron demo under demos/ so that it is
easier to catch those errors.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#195 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQ-rrGrd3inXlkRCDpri9MC0zXrMvt6Dks5rdNrSgaJpZM4MDqhZ>
.
|
Are you trying to run Lovefield in Node (assuming by express you mean http://expressjs.com/) ? If that is the case, we have this script https://github.com/google/lovefield/blob/master/tools/node_bootstrap.js, that does it (but it is currently not part of dist/). See usage examples at the top of that file. |
not working for me. whats the part with 'dist' ? |
Currently if you
You will not find node_bootstrap.js anywhere in the node_modules/lovefield/ folder. You would need to get that file separately yourself, until we fix this (#190). Can you explain what did you try exactly that is not working? It should be something along the lines of https://github.com/google/lovefield/blob/master/tools/node_bootstrap.js#L20-L24. |
did just that. added to file db.ts which is under (root)/db folder. not
working
…On Wed, Feb 22, 2017, 20:30 freshp86 ***@***.***> wrote:
Currently if you
npm install lovefield
You will not find node_bootstrap.js anywhere in the
node_modules/lovefield/. You would need to get that file separately
yourself, until we fix this (#190
<#190>). Can you explain what did
you try exactly that is not working? It should be something along the lines
of
https://github.com/google/lovefield/blob/master/tools/node_bootstrap.js#L20-L24
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#195 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQ-rrEYvkC5QDzMgsQ5bcz4hvOpMBSeoks5rfH7WgaJpZM4MDqhZ>
.
|
A screenshot of the error would be helpful.
|
[image: pasted1]
tried 'loadCustomJs'. not working.
unable to debug (using webpack). the app not starting
…On Wed, Feb 22, 2017 at 9:12 PM freshp86 ***@***.***> wrote:
Can you explain what did you try exactly that is not working?
A screenshot of the error would be helpful.
1. Is node_bootstrap.js executing?
2. What line is exactly failing?
3. Which method are you calling? Did you try loadCustomJs() and
provide the correct path yourself?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#195 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQ-rrL1vsFxYRraKEMwwGCdo53o8n3wTks5rfIiUgaJpZM4MDqhZ>
.
|
No description provided.
The text was updated successfully, but these errors were encountered: