Open kyuhas opened 2 years ago
Hey there, @kyuhas! Thanks for bringing this to our attention as well. I created a ticket for it - HELPS-2491 - and made sure to note that it relates to the previous issue showing the opposite problem with development mode working and production not. If it ends up being the same issue we may merge it together or delete one, if so we'll update here :)
I have a similar problem to https://github.com/open-olive/loop-development-kit/issues/450 but the other way around (I am experiencing a breaking error in development mode but do not see that same error in production mode). The specific error is:
failed to call callback: failed to call callback: TypeError: Cannot read property 'trim' of undefined or null at flushSyncCallbackQueueImpl (<eval>:374:86(48))
This happens within a couple components throughout my loop, but interestingly, I have discovered that it typically only happens the first time the whisper renders the component. If I close out of the whisper and then reopen it and reach that same component, the error does NOT occur and the component renders as I would expect. While debugging this myself, I added a console.log statement within the component itself and when the error occurs, the log statement always prints twice (as if the component is rendering twice). On subsequent renders of that component (e.g. closing out of the whisper and reopening it and following all of the same steps as before), the log statement only appears once and the component renders properly.
See below for a snippet of my code:
Also, the command to build in production mode is:
webpack --entry ./src/index.tsx
and the command to build in development mode is:webpack --entry ./src/index.tsx --watch --mode=development
.The webpack config file is shown below (note: I commented most of it out so that it always just returns the same default config that the LDK uses: