DEV Community

Discussion on: Build a chat app with Twilio and KendoReact

Collapse
 
philnash profile image
Phil Nash

Thanks very much!

You do not need to fill in the TWILIO_TWIML_APP_SID env variable, you only need the TWILIO_ACCOUNT_SID, TWILIO_API_KEY, TWILIO_API_SECRET and TWILIO_CHAT_SERVICE_SID.

When you start the application, are you running npm run dev? That should start the front end on localhost:3000 and the server on localhost:3001.

Let me know if that helps.

Collapse
 
zeluspudding profile image
Andrew Agostini • Edited

Yes, I have been starting it with npm run dev. When that didn't work I tweaked the localhost:3001 proxy to be http://127.0.0.1:3001/ and several other variations (even switching up the port number) according to suggestions on Stackoverflow and github, but those tries didn't pan out either. I would share other error messages to help you help me but unfortunately all I get is what I already posted above.

I also tried standing this up using your completed code (per chance I fudged something between pastes) but couldn't get that to work either. That threw a different error but I'm unable to share that one until this evening when I'm back home.

Thread Thread
 
philnash profile image
Phil Nash

Hmm, this is weird. Let me know what error you're getting from the completed project and hopefully we can get that fixed.

Also, for the one you worked on from the article, can you try the individual commands npm run server to start the server and npm start to build the front end and see if that helps or shows you any more errors?

Thread Thread
 
zeluspudding profile image
Andrew Agostini • Edited

Hey, thanks for following up!

I just checked and got this error:
'run-p' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-express-starter@0.1.0 dev:
run-p server start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-express-starter@0.1.0 dev script.

Seems to be related to not having npm-run-all. However, when I tried installing that using npm install npm-run-all I got another error saying:
npm ERR! 404 Not Found - GET https://registry.npmjs.org/event-stream/-/event-stream-3.3.6.tgz
npm ERR! 404
npm ERR! 404 'event-stream@3.3.6' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'twilio-chat-kendo-react'

...So stuck.

In a nice turn of events, however, I discovered TalkJS and got it working between two codepens in about 5 minutes. So I might be tinkering with that more.

It really strikes me that Twilio doesn't provide chat UI elements... like Stripe does with credit card forms. I know you're team has released Twilio Flex but I can't help but feel that a standalone chat element could only do good to sell more Twilio (it's not like it would canabalize your market for Flex).

At any rate, thank you for looking into this with me. I really do appreciate it.

Thread Thread
 
philnash profile image
Phil Nash

Ah, ok! This is an issue I've updated on a bunch of other projects, but not got to this one yet. This broke because of event-stream was compromised and then got yanked from the registry.

I've pushed updates to the package.json, so you should be able to pull the latest and try again.

Thread Thread
 
zeluspudding profile image
Andrew Agostini

Very interesting and unfortunate about event-stream (I hadn't known). I'm excited to try you're updated app :)

Changing the topic a bit, do you know of a site for checking whether an npm package is compromised.. something like Have I Been Pwnd? I couldn't find one in 30 seconds of googling...

Thread Thread
 
philnash profile image
Phil Nash

Compromised packages tend to be removed as soon as npm finds out about it, so there's not much need for a service like that.

There are services for checking whether a package has a vulnerability in. You can run npm audit or use something like Snyk to achieve this.