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:
- Set up and build a new project
electron-forge init forge && cd forge && npm run package
- Everything runs fine
- Change
requestedExecutionLevel
fromasInvoker
torequireAdministrator
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 - 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
- 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:
- Created 6 years ago
- Comments:8 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For anyone else running into this issue:
As of
electron-forge@6.0.0
we don’t useelectron-compile
by default. If you still experience this issue in a post-6.0.0 world you should raise an issue onelectron-compile
.