You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree to follow the code of conduct that this project follows, as appropriate.
I have searched the issue tracker for an issue that matches the one I want to file, without success.
Please describe your issue:
We just bumped into a variation of electron-userland/electron-forge-templates#55, but suspect it might be an issue with Electron Forge's core rather than the templates. Please refer to this issue for a full description of the problem. As a recap of that post: the Electron Forge toolchain appears to exhibit a caching issue that prevents imported Sass files from being recompiled when they're changed, even though the import is successfully compiled during the first build.
This issue happens for us when @importing a Sass file (eg: global.scss) from the style segment of a Vue single-file component (component.vue). In the issue referenced above, the OP seems to encounter the same issue from vanilla HTML and Sass files. Unlike that person's experience however, it doesn't matter for us whether the Sass file is a partial (_global.scss) or not (global.scss). Both are incorrectly cached during subsequent builds.
Behavior is as follows: the compiler will correctly perform an initial compilation when first encountering the @import statement, but further changes to the Sass file are not reflected in subsequent builds at all because the compiler keeps using a cached version of the file.
We know this is a caching issue because removing Electron Forge's cache folder and recompiling afterwards will make the changes to the imported Sass file show up. However, in order to make subsequent changes show up the cache folder needs to be removed over and over again manually. This is not ideal and appears to be a bug somewhere in the Electron Forge toolchain.
For people ending up here via Google looking for a quick fix, the cache folder can be removed like this:
# Remove the cache folder
$ rm -r $TMPDIR/compileCache_ # … and hit tab to complete the path, it contains a UUID# Run/build the app again
$ electron-forge start
Console output when you run electron-forge with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.
WARNING: DEBUG environment variable detected. Progress indicators will be sent over electron-forge:lifecycle
electron-forge:lifecycle Process Started: Checking your system +0ms
electron-forge:lifecycle Process Succeeded: Checking your system +409ms
electron-forge:runtime-config setting key: verbose to value: false +0ms
WARNING: DEBUG environment variable detected. Progress indicators will be sent over electron-forge:lifecycle
electron-forge:lifecycle Process Started: Locating Application +0ms
electron-forge:project-resolver searching for project in: /home/user/Workspace/project +0ms
electron-forge:project-resolver electron-forge compatible package.json found in /home/user/Workspace/package.json +4ms
electron-forge:lifecycle Process Succeeded: Locating Application +5ms
electron-forge:lifecycle Process Started: Preparing native dependencies +5ms
electron-forge:lifecycle Process Succeeded: Preparing native dependencies +345ms
electron-forge:hook could not find hook: generateAssets +0ms
electron-forge:lifecycle Process Started: Launching Application +2ms
electron-forge:lifecycle Process Succeeded: Launching Application +3ms
What command line arguments are you passing?
None
What does your config.forge data in package.json look like?
Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem. Using electron-forge init is a good starting point, if that is not the
source of your problem.
The text was updated successfully, but these errors were encountered:
Hmm, I reviewed that issue both before creating this one and again just now.
It doesn't appear to be describing the same behavior. So I'm not sure why this is being labeled as a duplicate.
Look, if I need to raise this elsewhere: feel free to let me know. I understand this could be caused by a dependency rather than Electron Forge itself, but it's not clear to me which that might be because I'm not familiar with all the components that make Forge tick. Thanks for your patience.
A minor refactor to getIsDownloaded(), which is async only because it
uses fancy-import. However this isn't necessary in order for testing, so
the code can be simplified a little by removing 'async'.
Please describe your issue:
We just bumped into a variation of electron-userland/electron-forge-templates#55, but suspect it might be an issue with Electron Forge's core rather than the templates. Please refer to this issue for a full description of the problem. As a recap of that post: the Electron Forge toolchain appears to exhibit a caching issue that prevents imported Sass files from being recompiled when they're changed, even though the import is successfully compiled during the first build.
This issue happens for us when
@import
ing a Sass file (eg: global.scss) from the style segment of a Vue single-file component (component.vue). In the issue referenced above, the OP seems to encounter the same issue from vanilla HTML and Sass files. Unlike that person's experience however, it doesn't matter for us whether the Sass file is a partial (_global.scss) or not (global.scss). Both are incorrectly cached during subsequent builds.Behavior is as follows: the compiler will correctly perform an initial compilation when first encountering the
@import
statement, but further changes to the Sass file are not reflected in subsequent builds at all because the compiler keeps using a cached version of the file.We know this is a caching issue because removing Electron Forge's cache folder and recompiling afterwards will make the changes to the imported Sass file show up. However, in order to make subsequent changes show up the cache folder needs to be removed over and over again manually. This is not ideal and appears to be a bug somewhere in the Electron Forge toolchain.
For people ending up here via Google looking for a quick fix, the cache folder can be removed like this:
Console output when you run
electron-forge
with the environment variableDEBUG=electron-forge:*
. (Instructions on how to do so here). Please include the stack trace if one exists.What command line arguments are you passing?
What does your
config.forge
data inpackage.json
look like?Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem. Using
electron-forge init
is a good starting point, if that is not thesource of your problem.
The text was updated successfully, but these errors were encountered: