brutalism icon indicating copy to clipboard operation
brutalism copied to clipboard

lstat directory error on Panel when /src/host/[appName] does not exist

Open Inventsable opened this issue 4 years ago • 1 comments

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.

Inventsable avatar Oct 16 '20 03:10 Inventsable

Just in case any one runs into this and is reading from the future, the workaround for this is to either:

    <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.

Inventsable avatar Oct 16 '20 03:10 Inventsable