Comments (10)
I think it is more because I am using react-scripts from create-react-app
from libsignal-node.
Does that mean your root folder is the src/
directory? You'll need a parent folder that contains the protos
dir for it to function properly. Tbuild env issue?
from libsignal-node.
I created the simplest electron app following this blog post: https://medium.freecodecamp.org/building-an-electron-application-with-create-react-app-97945861647c
And then I included a file (project/src/Controller.js) which require('libsignal');
I think the create-react-app somehow overrides the __dirname and I get a file not found error
from libsignal-node.
I'll see if I can't repro this weekend. In the meantime if you manage to identify what the actual FS layout is inside that electron sandbox or an alternative to __dirname
(which I'd happily take a PR for), let me know.
from libsignal-node.
thanks, I will keep trying. So far the only solution I have found is to hard code the path
from libsignal-node.
Are you by chance using webpack on the node modules?
See: https://codeburst.io/use-webpack-with-dirname-correctly-4cad3b265a92
I still think there might be something amiss in your env. It also looks like webpack and electron have a troubled history with __dirname
; I'm going to hold off on merging your pull request (#6) as it makes some assumptions about /
being a special directory and the module.i
property is not one that resolves in my system; So something isn't right. That guide is too involved for me to get into, so I'm going to apply a small compatibility change to the usage of __dirname
in that module and you might try messing with the electron options in your setup, as per that link above (namely the __dirname: false
option).
from libsignal-node.
@ghbutton what version of node are you using? I see some internet chatter about __dirname
behavior being different for the new ECMAScript modules (https://nodejs.org/api/esm.html). Looks like it's still experimental but perhaps electron and/or your react env are turning that on. There might be a technique I can use that's compatible with this new module system, so let me know.
from libsignal-node.
I am using version 11.8.0
from libsignal-node.
Yea, I think it might be an electron issue of some kind
from libsignal-node.
thank you
from libsignal-node.
Related Issues (5)
- Storage API HOT 1
- Tests? HOT 1
- Missing 'removePreviousSessions' function on SessionRecord class HOT 1
- But how does it work? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libsignal-node.