You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using pages starter repo with chat SDKs. Chat-ui-react component lib have a third party dep with this package.json.
Instead of using the "non-browser" path (such as the one specified in "main" field), pageJS/vite bundler uses the "browser" path which contains browser API usage. This causes document is not defined error.
Using vite debug flag, I can see that vite.browserField is currently true. Overriding that manually to false in the starter repo seems to resolve this issue
Seems like something that should be set in pagesJS vite plugin for SSR?
Following that config update, I then receive this error from the bundle:
I'm unable to locate what or why it would be undefined. Any idea why this issue is occuring?
Can you link the Yext account you're testing with as well as the command you're running that leads to this? A link to the Slack thread would be good too.
I don't have a guess for the second error, but does it still exist with 1.0.0-rc.0?
Can you link the Yext account you're testing with as well as the command you're running that leads to this? A link to the Slack thread would be good too.
I don't have a guess for the second error, but does it still exist with 1.0.0-rc.0?
slack thread and Yext account link (although the repo is not using any data tie to a specific account so I think you could use any account here)
command: npm run dev (and "build:local": "vite build -d" for vite debug)
For the second error, I tried upgrading pages to "@yext/pages": "1.0.0-rc.0", and it gave me a different error:
The actual issue stems from react-textarea-autosize which I opened an issue for. It sounds like they are going to try to make an update that would resolve this. Once that happens chat-ui-react will need to be updated to the version of react-textarea-autosize with the fix.
Setting browserField to false is a no go because it breaks a lot of other things.
Describe the bug
I'm using pages starter repo with chat SDKs. Chat-ui-react component lib have a third party dep with this package.json.
Instead of using the "non-browser" path (such as the one specified in "main" field), pageJS/vite bundler uses the "browser" path which contains browser API usage. This causes
document is not defined error
.Using vite debug flag, I can see that vite.browserField is currently true. Overriding that manually to false in the starter repo seems to resolve this issue
Seems like something that should be set in pagesJS vite plugin for SSR?
Following that config update, I then receive this error from the bundle:
I'm unable to locate what or why it would be undefined. Any idea why this issue is occuring?
Reproduction
https://github.com/yen-tt/test-pages
System Info
Used Package Manager
npm
Used Browser
Chrome
Validations
The text was updated successfully, but these errors were encountered: