question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error 'Asked for index.html but it was not precompiled' after editing exe manifest to require admin privileges in a packaged app

See original GitHub issue
  • [ x] I have read the contribution documentation for this project.
  • [ x] I agree to follow the code of conduct that this project follows, as appropriate.
  • [ x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue: Running into compilation issues in packaged app on Windows 10, when requested execution level of the exe is changed to requireAdministrator

Steps to reproduce:

  1. Set up and build a new project electron-forge init forge && cd forge && npm run package
  2. Everything runs fine
  3. Change requestedExecutionLevel from asInvoker to requireAdministrator in /out/forge-win32-x64/forge.exe manifest I used mt.exe to extract and edit the manifest since node-rcedit doesn’t seem to be working properly right now. Editing manifest using rcedit results in this issue and adding "win32metadata": { "requested-execution-level": "requireAdministrator" } to forge config results in ‘side by side configuration error’ when running the exe
  4. When you run the exe, you get the following error in the window: Failed to compile C:/…/app/src/index.html. Asked for C:/…/app/src/index.html but it was not precompiled
  5. When you run the exe from an admin cmd, it actually works fine again

I imagine this is probably electron-compile or electron-prebuild-compile issue, but let me know what you think and I’ll open the issue with the correct project if needed.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ppuvanasingamcommented, Sep 11, 2018

For anyone else running into this issue:

  • Make sure you put your HTML and any static files inside a sub-folder i.e. dist, or src, then point all the files to the correct directory, and recompile, that seems to resolve my issue.
0reactions
MarshallOfSoundcommented, Apr 16, 2018

As of electron-forge@6.0.0 we don’t use electron-compile by default. If you still experience this issue in a post-6.0.0 world you should raise an issue on electron-compile.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error 'Asked for index.html but it was not precompiled' after ...
Error 'Asked for index.html but it was not precompiled' after editing exe manifest to require admin privileges in a packaged app #439.
Read more >
Is It Possible To Modify an EXE to require run as admin?
Right-click the application. Open properties. Go to the compatibility tab. Under settings, check "Run this program as an administrator". This ...
Read more >
The Asset Pipeline - Ruby on Rails Guides
In production, Rails precompiles these files to public/assets by default. The precompiled copies are then served as static assets by the web server....
Read more >
Failed to resolve packages: - Unity Forum
tmp\tmp-57644YEp7fzD8aJF\package\package.json] cannot be found. No packages loaded. A re-import of the project may be required to fix the issue ...
Read more >
Common Configuration - electron-builder
in the package.json file of your project using the build key on the top level: "build": { "appId": "com.example.app" } · or through...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found