-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Cannot find module ... app.asar/index.js #303
Comments
Try to set path as |
@develar I've tried this, rebuilt and reinstalled the dmg but getting the same error. I'm not using any es6 or module system in my project, maybe that has something to do with it? |
Wel... To ensure that it is not an asar issue, set |
@develar [Edit, wrong mention] |
@skotturi Please check |
@develar no, its my dev package.json! how can I fix this?
|
SOLVED! My app files were in
Maybe there should have been an error or warning thrown when build didnt find an app folder? To avoid the rather stupid mistake that I have committed.. I was seeing the following when building with a
The Anyway thanks @develar for the patience and helping debug! |
A further note, I think that because when running package.json:
I was able to get things running locally with www and didnt think to switch to app. |
You can specify app dir:
|
ToDo:
@skotturi Please explain why |
I was using |
@develar looks like only the checking of the package.json is now left to be done. Are you on to it? |
No. If you want — please help. |
Can you outline the checking process? Or should I come up with a proposition first? |
@develar does it sound reasonable to run code similar to the assertPack to test the validity of the application package.json? |
@demetris-manikas Yes. We should check:
|
I see. I 'll give it a try. |
I was having the
Hope it helps someone. |
Sorry I'm a little bit lost, I have a similar project, where I have a webpage generate with Jhipster. In the project directory I'm doing a gulp build which generates a build directory.
I have another folder with the electron configuration, with the index.js pointing to build/www/index.js. When I package the electron app, the build directory is missing, if I manually copy inside resources it works. Is there an elegant solution instead of manually copying the directory? |
I have an issue similar to this... Exact same error. But then you said: I tried setting asar to false and suddenly it work when i unpack my asar file i can find the location... But i still get the can not find script file error.. wtf.. |
Successfully built my angular1 app as an electron app. I can run it using electron-prebuilt, however, when I launch the installed dmg, the app fails immediately.
Image contains error message:
my dev-level package.json:
my app-level package.json which specifies a main.js:
my main.js just in case it helps: [EDIT with correct main.js]
I launched Mac Finder > my app > Contents > Resources
to see if app.asar was an inspectable but its a binary file:
app.asar: application/octet-stream; charset=binary
Any help or pointing in the right directions of resources is much appreciated.
The text was updated successfully, but these errors were encountered: