brutalism
brutalism copied to clipboard
lstat directory error on Panel when /src/host/[appName] does not exist
Unintentional oversight. The Panel component is meant to search for scripts in specified locations on mount cycle and due to bombino's legacy file structure, assumes a panel will explicitly have /src/host/[appName] without nullifying the process when this doesn't exist.
This only affects panels which are made from scratch (importing brutalism into a non-bombino template) but should be fixed so I'm documenting it for later:
Object.fs.lstatSync > Panel.isFolder > Panel.loadScriptPath > mounted() cycle.
Just in case any one runs into this and is reading from the future, the workaround for this is to either:
- Explicitly define a script-path prop pointing to a .jsx file in your Panel component:
<Panel script-path="./host.jsx">
<router-view />
</Panel>
Since file paths within props are relative to the root, the file is located at the panel root: someFolder/YourPanelRoot/host.jsx.
- Create the file manually, as something like /src/host/ILST/host.jsx, even if this file is empty.