Open chapmandu opened 2 years ago
(I added <details>
tag in your original post to make it short and can see the details when it is required)
Thanks for the report.
I think the issue is a side effect of the behavior of Webpack and the workaround for embed. The missing file keep
is a kind of placeholder to make embed
runs without error even if the directory is initially empty, but I found the file was removed after Webpack runs. (As far as I remember, this behavior is somewhat different than before.) The sequence was maybe,
go build
detected file list for assets (including keep)As described above, it seems like Webpack removes all pre-existing files when it dumps its new files into the assets
directory. The next time, the file keep
is not an issue anymore, but this issue could happen again because the other asset files could be in the same situation.
I will check it in more detail.
Found the root cause:
was introduced to fix the other issue by https://github.com/gobuffalo/cli/pull/71 and it made Webpack removes all existing files under the target destination directory by default. (https://webpack.js.org/guides/output-management/#cleaning-up-the-dist-folder)
Since this issue happens randomly, just ignoring the error could be one option for now, or removing the config clean: true
from the webpack.config.js
could be another option if the issue happens frequently.
FYI, buffalo build
command has an option --clean-assets
for cleaning the asset directory when it builds a binary.
I will keep this issue open and will revisit again to find a better solution.
Description
Description
Running
buffalo dev
after creating a new application causes exception.Expected Behavior
Expect the command to be completed without exit.
Actual Behavior
Terminal output (snippet.. full output further down)
public dir:
Full terminal output
To Reproduce
Executing
buffalo dev
a second time will complete successfully, though it's not ideal.Additional Context
OS: Linux Mint 20.3
Details