Skip to content
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

Unable to load index.html when packed in to asar file #200

Closed
woodman231 opened this issue Jun 19, 2018 · 3 comments
Closed

Unable to load index.html when packed in to asar file #200

woodman231 opened this issue Jun 19, 2018 · 3 comments

Comments

@woodman231
Copy link

Hey Maxime, gret repo. I have really enjoyed using it. I have been coding an app based on it for a couple of months now and I am having some problems compling / using it on other computers beside my own. My Project works just fine on my computer but then on other computers I am getting "not allowed to load resource "file://localclonedpath/dist/index.html".

When looking at the dist folder sure enough "index.html" is missing. When logging __dirname on this computer that won't compile correctly it says: "/localclonedpath/node_modules/electron/dist/resources/electron.asar/renderer", When logging __dirname on the computer that does work properly it shows "/localclonedpath/dist" and that file "index.html" is in there after running the npm start. So why do you think the results of npm start are different on the different computers?

A couple of version stuff that i can think to provide:
Working Computer:
Windows 10
git version 2.10.2.windows.1
npm 3.10.8
node 6.9.1
process.versions.electron 1.7.8
process.versions.chrome 58.0.3029.110

Computer that isn't working:
Ubuntu Desktop 18.04 LTS
git version 2.17.1
npm 3.5.2
node v8.10.0
process.versions.electron 1.7.8
process.versions.chrome 58.0.3029.110

I also did this on a Windows server 2016 and I am getting the same problem where it doesn't have the renderer information directly in the dist folder. So I am just confused and not sure what to do with the fact that this works on my computer but after I clone it and run npm install, then npm run. It doesn't seem to work.

@sanchezpablo
Copy link

Same problem here...

image

With npm run electron:local everything runs good

with npm run electron:windows, the problem arised.

@stuartbgreen
Copy link

@Robbyn666 This approach saved my day. Thank you!

@zirhoo
Copy link

zirhoo commented Mar 13, 2024

@stuartbgreen what approach are you referring here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@woodman231 @zirhoo @sanchezpablo @maximegris @stuartbgreen and others