adverse-sapphire
adverse-sapphire16mo ago

"yarn dev" leads to myriad of errors

using node v20 in the examples/live-agent repo and getting the following:
37 Replies
Tico | Voiceflow Assistant
To resolve the errors you're encountering when running yarn dev in the examples/live-agent repo using Node v20, follow these steps: 1. Check Node Version Compatibility: - Ensure the project is compatible with Node v20. Some projects may require a specific Node version. You can check the engines field in the package.json file for the required Node version. 2. Install Dependencies: - Run yarn install to ensure all dependencies are correctly installed. This can resolve many issues related to missing or incompatible packages. 3. Clear Cache: - Sometimes, clearing the yarn cache can help. Run yarn cache clean and then yarn install again. 4. Update Dependencies: - If the project dependencies are outdated, you might need to update them. Run yarn upgrade to update all dependencies to their latest versions. 5. Check for Known Issues: - Look for any known issues in the repository's issue tracker on GitHub. There might be specific fixes or workarounds for Node v20. 6. Run the Development Server: - After ensuring all dependencies are correctly installed and updated, run yarn dev again. If the errors persist, you might need to provide more specific error messages for further assistance. For more detailed instructions, you can refer to the Voiceflow demo-react-chat repository.
adverse-sapphire
adverse-sapphireOP16mo ago
"yarn upgrade" does not work, yarn up does though. still identical errors on v20 + yarn dev
adverse-sapphire
adverse-sapphireOP16mo ago
No description
adverse-sapphire
adverse-sapphireOP16mo ago
got it working with the demo-react-chat app
adverse-sapphire
adverse-sapphireOP16mo ago
No description
adverse-sapphire
adverse-sapphireOP16mo ago
it "works" but the typing thing dissapears instantly and i get no response back how can i get this working? @SuperZooper ty
equal-aqua
equal-aqua16mo ago
@Deleted User on the repo for react chat demo it states:
No description
equal-aqua
equal-aqua16mo ago
so might be that it messes up due to it just not being supported anymore?
adverse-sapphire
adverse-sapphireOP16mo ago
its the react-chat repo https://github.com/voiceflow/react-chat/tree/master/examples/live-agent trying d15bb6d1c44ccaa3d4d743bbae02d2675a03146a
adverse-sapphire
adverse-sapphireOP16mo ago
No description
adverse-sapphire
adverse-sapphireOP16mo ago
How can I fix this @MikeG ? for the react-chat/examples/live-chat
automatic-azure
automatic-azure16mo ago
did you put your API key, project ID and project versoin like it says in the .env?
adverse-sapphire
adverse-sapphireOP16mo ago
it doesnt ask for an API key only a project ID there is nowhere to put an API key
automatic-azure
automatic-azure16mo ago
huh
adverse-sapphire
adverse-sapphireOP16mo ago
No description
adverse-sapphire
adverse-sapphireOP16mo ago
react-chat repo, examples/live-agent folder only asks for VF_PROJECT_ID
automatic-azure
automatic-azure16mo ago
i see, have you published your agent?
adverse-sapphire
adverse-sapphireOP16mo ago
no, im not sure what that means or how to do it i imported the .vf file
automatic-azure
automatic-azure16mo ago
top right
No description
automatic-azure
automatic-azure16mo ago
click publish and then get the project ID after that
adverse-sapphire
adverse-sapphireOP16mo ago
ok one sec
automatic-azure
automatic-azure16mo ago
it opens it up to public connections i need to do something else rn so if you're sitll sturgging, i'll try to get back later
adverse-sapphire
adverse-sapphireOP16mo ago
thanks man OK now im getting 200's ok it works how can i get streaming working now? so that answers are sent word-by-word/character-by-character?
equal-aqua
equal-aqua16mo ago
Thats not natively supported, you'd need to program that yourself
adverse-sapphire
adverse-sapphireOP16mo ago
ok great
automatic-azure
automatic-azure16mo ago
adverse-sapphire
adverse-sapphireOP16mo ago
yup thats what im doing! using the components from react-chat
W. Williams (SFT)
Just a random question: why are you trying to use the react-chat?
adverse-sapphire
adverse-sapphireOP16mo ago
what do you mean @W. Williams (SFT) ? it contains components to create a custom chatbot UI which is what im using it for and then using streaming-wizard as an example of how to do streaming let me know if im on the right path
continuing-cyan
continuing-cyan16mo ago
Had the same issues. What worked for me is to first do yarn install and right after that do yarn build. Also publishing the agent and setting the versionID to "production" in the config.ts is what made it finally work. My goal is to host the webchat client, live handoff server + websocket on a separate server that connects to my admin dashboard where my clients their live agent employees can send/receive messages in case when there's an handoff. How do I embed my customised webchat widget on my clients their websites? The only example on GitHub shows a more local approach where it assumes you have the website built in React to import the react-chat package? https://github.com/voiceflow/react-chat?tab=readme-ov-file#browser-usage My goal is to point it to a remote server with my customised webchat widget but have it in a similar fashion like the JS snippet so I can use verify: {{ projectID: 'XXX' }} for all my different clients.
adverse-sapphire
adverse-sapphireOP16mo ago
pls start your own thread thanks
W. Williams (SFT)
FYI: You can do all this using extensions now and not have to run your own server.
adverse-sapphire
adverse-sapphireOP16mo ago
what do you mean? can you clarify
W. Williams (SFT)
voiceflow extensions they allow you to run custom code within VF
adverse-sapphire
adverse-sapphireOP16mo ago
great im just trying to get the live agent chat demo working, but with streaming a little difficult because theres no turn indicators ah i see the extensions page. very cool. will be using this eventually
W. Williams (SFT)
repo above plus video too 🙂

Did you find this page helpful?