Closed thedist closed 4 months ago
Did you rebuild the webui after pulling this change?
to go with this backend change, a change was made in the ui to adjust how the parameters are sent https://github.com/bitfocus/companion/blob/main/webui/src/util.tsx#L53-L62
This was all necessary to make typescript happy when defining the socket.io messages in typescript
Trying to build the webui gives me:
failed to load config from C:\Users\jeff\workspace\companion3\webui\vite.config.js
error during build:
TypeError: envCompatible.default is not a function
at file:///C:/Users/jeff/workspace/companion3/webui/vite.config.js.timestamp-1708352277560-2c69c2db4c8ae.mjs:23:26
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
Even if I change envCompatible.default
, to envCompatible.default.default
so that runs, it then errors on
RollupError: "useResizeObserver" is not exported by "node_modules/usehooks-ts/dist/esm/index.js", imported by "src/Buttons/ButtonGridActions.tsx".
file: C:/Users/jeff/workspace/companion3/webui/src/Buttons/ButtonGridActions.tsx:8:9
6: import classnames from 'classnames'
7: import { GenericConfirmModal, GenericConfirmModalRef } from '../Components/GenericConfirmModal.js'
8: import { useResizeObserver } from 'usehooks-ts'
^
I did a fresh clone, yarn, and build, and this seems to be resolved now, so somehow my previous Companion clone must have ended up in an inconsistent state but I'm not sure how considering according to git pull
and yarn
both my previous clone and my new one were both up to date and should have been the same.
When I have time I'll have to compare the 2 and see what files ended up in an inconsistent state and why, but for now I'll close this.
Possibly a stray node_modules
folder?
One of the recent changes was changing from mulitple isolated yarn1 projects to a yarn4 monorepo
Is this a bug in companion itself or a module?
Is there an existing issue for this?
Describe the bug
97a3f08 has an issue with https://github.com/bitfocus/companion/blob/74e4074b4bc7d24bcc55bd05ada868270a09828a/companion/lib/UI/Handler.js#L123
Which results in the error
and similar for the other events like
triggers:subscribe
,surfaces:subscribe
etc...args
is a function here, so trying to use the spread operator is what throws an error as you can't iterate over a function. Also,cb
is undefined so even if line 123 was fixed, it'd error on 124 withcb is not a function
, as that's also incorrect here.Steps To Reproduce
UI/Handler
Expected Behavior
Expected behaviour is that of prior to the commit.
Environment (please complete the following information)
Additional context
No response