You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi I have the same problem,This code returns undefined,In nw.js version 0.14.7 , use ffi Error.prepareStackTrace = function (e, st) { for (var i=0, l=st.length; i<l; i++) { fileName = st[i].getFileName() if (fileName !== __filename) { if (calling_file) { if (fileName !== calling_file) { return } } else { return } } } }
hi I have the same problem,This code returns undefined,In nw.js version 0.14.7 , use ffi Error.prepareStackTrace = function (e, st) { for (var i=0, l=st.length; i<l; i++) { fileName = st[i].getFileName() if (fileName !== __filename) { if (calling_file) { if (fileName !== calling_file) { return } } else { return } } } }
i have the same problem ,when i use electron and ffi
This issue is still not fixed for electron -- at least when bindings package is bundled using rollup.
/**
* Gets the filename of the JavaScript file that invokes this function.
* Used to help find the root directory of a module.
* Optionally accepts an filename argument to skip when searching for the invoking filename
*/
When bundled, it's already embedded in the javascript. There is no other file that calls it.
This is the error:
Uncaught Exception:
TypeError: Cannot read property 'indexOf' of undefined
at Function.getFileName (/xxx/my-app/out/theCucumber.app.x/the-great-app-darwin-x64/the-great-app.app/Contents/Resources/app/src/bundle.js:260:16)
at bindings (/xxx/my-app/out/theCucumber.app.x/the-great-app-darwin-x64/the-great-app.app/Contents/Resources/app/src/bundle.js:165:48)
at Object.<anonymous> (/xxx/my-app/out/theCucumber.app.x/the-great-app-darwin-x64/the-great-app.app/Contents/Resources/app/src/bundle.js:1290:16)
at Module._compile (internal/modules/cjs/loader.js:968:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:986:10)
at Module.load (internal/modules/cjs/loader.js:816:32)
at Module._load (internal/modules/cjs/loader.js:728:14)
at Module._load (electron/js2c/asar.js:717:26)
at Function.Module._load (electron/js2c/asar.js:717:26)
at Object.<anonymous> (electron/js2c/browser_init.js:5785:12)
This is the location of error:
// handle filename that starts with "file://"
var fileSchema = 'file://';
if (fileName.indexOf(fileSchema) === 0) {
fileName = fileUriToPath_1(fileName);
}
Reacted by Nooc, can2, Krishna Khajuria and Alexey Chudinov
Activity
perymimon commentedon Dec 12, 2018
i still reproduce it when i use
leveldownpackage1009466147 commentedon Jan 21, 2019
hi I have the same problem,This code returns undefined,In nw.js version 0.14.7 , use ffi
Error.prepareStackTrace = function (e, st) { for (var i=0, l=st.length; i<l; i++) { fileName = st[i].getFileName() if (fileName !== __filename) { if (calling_file) { if (fileName !== calling_file) { return } } else { return } } } }E3V3A commentedon Jan 23, 2019
It seem that @TooTallNate is too concerned telling people about his height. 🤔 A PR has fixed the issue but has not been merged...
thisTom commentedon Aug 27, 2019
i have the same problem ,when i use electron and ffi
pjebs commentedon Apr 16, 2020
This issue is still not fixed for electron -- at least when
bindingspackage is bundled using rollup.When bundled, it's already embedded in the javascript. There is no other file that calls it.
This is the error:
This is the location of error:
pjebs commentedon Apr 16, 2020
Is it not standard practice to bundle your javascript files into 1 in electron?