extended-salmon
extended-salmon2y 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.
extended-salmon
extended-salmonOP2y ago
"yarn upgrade" does not work, yarn up does though. still identical errors on v20 + yarn dev
extended-salmon
extended-salmonOP2y ago
No description
extended-salmon
extended-salmonOP2y ago
got it working with the demo-react-chat app
extended-salmon
extended-salmonOP2y ago
No description
extended-salmon
extended-salmonOP2y ago
it "works" but the typing thing dissapears instantly and i get no response back how can i get this working? @SuperZooper ty
MikeG
MikeG2y ago
@Deleted User on the repo for react chat demo it states:
No description
MikeG
MikeG2y ago
so might be that it messes up due to it just not being supported anymore?
extended-salmon
extended-salmonOP2y ago
its the react-chat repo https://github.com/voiceflow/react-chat/tree/master/examples/live-agent trying d15bb6d1c44ccaa3d4d743bbae02d2675a03146a
extended-salmon
extended-salmonOP2y ago
No description
extended-salmon
extended-salmonOP2y ago
How can I fix this @MikeG ? for the react-chat/examples/live-chat
deep-jade
deep-jade2y ago
did you put your API key, project ID and project versoin like it says in the .env?
extended-salmon
extended-salmonOP2y ago
it doesnt ask for an API key only a project ID there is nowhere to put an API key
deep-jade
deep-jade2y ago
huh
extended-salmon
extended-salmonOP2y ago
No description
extended-salmon
extended-salmonOP2y ago
react-chat repo, examples/live-agent folder only asks for VF_PROJECT_ID
deep-jade
deep-jade2y ago
i see, have you published your agent?
extended-salmon
extended-salmonOP2y ago
no, im not sure what that means or how to do it i imported the .vf file
deep-jade
deep-jade2y ago
top right
No description
deep-jade
deep-jade2y ago
click publish and then get the project ID after that
extended-salmon
extended-salmonOP2y ago
ok one sec
deep-jade
deep-jade2y 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
extended-salmon
extended-salmonOP2y 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?
MikeG
MikeG2y ago
Thats not natively supported, you'd need to program that yourself
extended-salmon
extended-salmonOP2y ago
ok great
deep-jade
deep-jade2y ago
extended-salmon
extended-salmonOP2y 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?
extended-salmon
extended-salmonOP2y 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
vicious-gold
vicious-gold2y 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.
extended-salmon
extended-salmonOP2y 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.
extended-salmon
extended-salmonOP2y ago
what do you mean? can you clarify
W. Williams (SFT)
voiceflow extensions they allow you to run custom code within VF
extended-salmon
extended-salmonOP2y 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?