Open ghost opened 7 years ago
I get the same thing, but only on Windows (for .jsx
files in the project). On Mac, the produced application runs fine.
@ghost Check the capitalization of things in your import
statement to ensure they match what exists on the filesystem. For reference: https://github.com/electron-userland/electron-forge/issues/254
I hit something similar and could workaround it with the changes introduced in #199. I was seeing:
W, dd mmm YYYY hh:mm:ss GMT electron-compile:file-change-cache cacheKey: C:/Users/<user>/git/<app-path>/resources/index.html, appRoot: c:/Users/pazosa/git/<app-path>/resources/app.asar , originalAppRoot: C:/Users/<user>/AppData/Local/Temp/electron-packager/win32-x64/<app>/resources/app
W, dd mmm YYYY hh:mm:ss GMT electron-compile:protocol-hook Failed to compile C:/Users/<user>/git/<app-path>/resources/index.html: Asked for C:/Users/<user>/git/<app-path>/resources/index.html but it was not precompiled!
And got me wondering if that appRoot: c:
(notice c:
capitalisation) was the source of the error.
So my workaround was to bypass the cache for good:
require('electron-compile').addBypassChecker(function (filePath){return true});
I don't understand why a caching mechanism makes an app fall-over. I think that's a but and it should log warnings if there is something wrong with the cache, but it shouldn't break the app.
Please describe your issue:
when I start the app with
I don't get any errors
Packaging the app seems to work as well.
But when I start the packaged app I get the following error in the DevTools Console
I tried to run electron-compile in the root folder and copy the .cache folder into the package, but it didn't change anything.
What command line arguments are you passing?
What does your config.forge data in package.json look like?