twilio / twilio-video-app-react

A collaboration application built with the twilio-video.js SDK and React.js
Apache License 2.0
1.8k stars 725 forks source link

Compile failed when executing "npm run deploy:twilio-cli" #761

Closed JoshuaSunsheng closed 1 year ago

JoshuaSunsheng commented 1 year ago

Describe the bug I execute the commands according to guidebook.

But when it begins to deploy, it got the following err message.

➜  twilio-video-app-react git:(master) npm run deploy:twilio-cli

> twilio-video-app-react@0.7.1 deploy:twilio-cli
> cross-env REACT_APP_SET_AUTH=passcode npm run build && twilio rtc:apps:video:deploy --authentication=passcode --app-directory ./build

> twilio-video-app-react@0.7.1 build
> node ./scripts/build.js

Creating an optimized production build...
Failed to compile.

TS2786: 'Container' cannot be used as a JSX component.
  Its element type 'ReactElement<any, any> | Component<Pick<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "children" | ... 252 more ... | keyof ClassAttributes<...>> & StyledComponentProps<...> & { ...; }, any, any> | null' is not a valid JSX element.
    37 |
    38 |   return (
  > 39 |     <Container style={{ height }}>
       |      ^^^^^^^^^
    40 |       {roomState === 'disconnected' ? (
    41 |         <PreJoinScreens />
    42 |       ) : (

To Reproduce Steps to reproduce the behavior: Follow steps in the guide book. And when it comes to execute "npm run deploy:twilio-cli". It does not work.

Environment (please complete the following information):

manjeshbhargav commented 1 year ago

Hi @JoshuaSunsheng ,

Sorry for the delayed response. Is there a way I can access your source? I want to try the build myself.

JoshuaSunsheng commented 1 year ago

Hi @JoshuaSunsheng ,

Sorry for the delayed response. Is there a way I can access your source? I want to try the build myself.

I do not change the code. I do as the guidebook. My teammates all compile failed.

The steps I did is as followed: (1) check my local version node --version -> v18.12.1 npm --version -> 9.1.2 (2) git clone https://github.com/twilio/twilio-video-app-react.git (3) npm install (4) npm install -g twilio-cli (5) twilio login (6) twilio plugins:install @twilio-labs/plugin-rtc (7) npm run deploy:twilio-cli

I compiled failed at the last step. I show the error as I mention in the page.

mcarrerasm commented 1 year ago

Hi @JoshuaSunsheng,

I've tried to reproduce it on my end, but I can't reproduce the error. Please confirm you are using the latest version of the plugins with the following command:

twilio plugins:update

Could you please try with the latest version of the React App?

Have a look at the versions that I used to reproduce it:

node -v --> v18.2.1 npm -v --> 9.1.2 twilio -v --> twilio-cli/5.2.2 darwin-x64 node-v16.18.0 twilio plugins --> @twilio-labs/plugin-rtc 0.8.4

Please share with us your findings.

JoshuaSunsheng commented 1 year ago

Hi @mcarrerasm,

Can you provide package.json and package-lock.json files to me after you compile it? I want to compare them with my local complied version.

I think the problem come from the React and its related plugin's version since the error is all about the syntax of typescript.

mcarrerasm commented 1 year ago

@JoshuaSunsheng find attached the files.

Please let me know if that helps. package.zip

seancoleman2 commented 1 year ago

Hi @JoshuaSunsheng we are going to close this due to inactivity, but please let us know if you are still having issues and we will reopen it.