Skip to content

Commit

Permalink
fix: Explain file removal errors and give recommendations (#400)
Browse files Browse the repository at this point in the history
Related-to vaadin/flow#9948

Co-authored-by: Jouni Koivuviita <jouni@vaadin.com>
  • Loading branch information
mshabarov and jouni committed Apr 28, 2021
1 parent 38cd5a1 commit e81e096
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion articles/ds/customization/custom-theme.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,21 @@ public class Application extends SpringBootServletInitializer
Changes to the theme folder's contents are automatically picked up during development.
If the application has live reload enabled, the UI should reload automatically.
Otherwise a page reload may be needed to see the changes.
Sometimes, compilation throws an error (“no such file or directory”) when files or folders are removed from the theme folder while the application is running, but a page reload should resolve it.

Sometimes, compilation throws an error (“no such file or directory”) when files or folders are removed from the theme folder while the application is running.
This might happen due to the following reasons:

. The file being removed is a style sheet referenced from [filename]#my-theme/styles.css#, or from other style sheet in the theme folder.
In that case, to avoid re-compilation errors, remove the style sheet import first, and then remove the file.
. The file being removed is a component style sheet in [filename]#my-theme/components# folder, or the whole [filename]#my-theme/components# folder.
The files inside components folder are referenced from autogenerated file [filename]#theme-my-theme.generated.js# and re-compilation fails because webpack cannot find them.
To avoid errors, remove your component style sheet simultaneously (in one go) with the theme generated file.

.Dismissing the error message
[NOTE]
When you encounter a “no such file or directory” error reported by webpack and shown in the overlay in your application, click on the overlay (or refresh the browser page), and it should disappear.
You can then continue working on your application and theming.
If it doesn't help, you need to restart the application.

== Master Style Sheet

Expand Down

0 comments on commit e81e096

Please sign in to comment.