Comments (8)
Thanks to the Twilio team for building and releasing these sample applications!
To Reproduce
- Run
npm run deploy:twilio-cli
- Encounter error:
Creating an optimized production build... Failed to compile. /Users/adamf/Dev/twilio/twilio-video-app-react/src/components/MainParticipant/MainParticipant.tsx TypeScript error in /Users/adamf/Dev/twilio/twilio-video-app-react/src/components/MainParticipant/MainParticipant.tsx(11,26): Type 'Participant' is not assignable to type 'LocalParticipant | RemoteParticipant'. Type 'Participant' is not assignable to type 'RemoteParticipant'. Types of property 'audioTracks' are incompatible. Type 'Map<string, AudioTrackPublication>' is not assignable to type 'Map<string, RemoteAudioTrackPublication>'. Type 'AudioTrackPublication' is not assignable to type 'RemoteAudioTrackPublication'. Property 'isSubscribed' is missing in type 'LocalAudioTrackPublication' but required in type 'RemoteAudioTrackPublication'. TS2322 9 | /* audio is disabled for this participant component because this participant's audio 10 | is already being rendered in the <ParticipantStrip /> component. */ > 11 | <MainParticipantInfo participant={mainParticipant}> | ^ 12 | <ParticipantTracks participant={mainParticipant} disableAudio enableScreenShare videoPriority="high" /> 13 | </MainParticipantInfo> 14 | );
Environment
- OS: macOS 10.15.3
- Browser: N/A (Chrome)
- App Version: 0.3.6
- SDK Version: twilio-cli/1.10.0 darwin-x64 node-v12.16.1
- Node.js version: 12.14.1 and 12.16.1
Additional context
Shell:zsh
First tried with
yarn
, then withnpm
-- ran into same issue at same step -- deletednode_modules
between switching package managers.
same issue here
from twilio-video-app-react.
Hey everyone. Thanks for the info!
I am able to reproduce this issue when I run yarn install
instead of npm install
. However everything works correctly when I run npm install
.
@ahmedmgh67 @osamaKu - Are you using yarn or npm to install dependencies? Does the app build correctly if you use npm?
It seems the problem has to do with the version of typescript installed. Npm will install version 3.7.5, because this is what is specified in the package-lock.json
file.
Yarn ignores package-lock.json
, and there is no yarn.lock
file, so yarn installs a newer version of Typescript - version 3.8.3. This app hasn't yet been tested with version 3.8.3 of typescript and it seems to cause the above mentioned problems, which I'll look into this week.
If you still want to use yarn, try running the yarn import
command. This will use package-lock.json
to generate a yarn.lock
file.
from twilio-video-app-react.
I'm glad it's working @adamfeldman! The Typescript 3.8.3 problems are something to look into - I've added a ticket to our backlog.
from twilio-video-app-react.
Same issue. Any updates from the twilio team?? @paynerc @kwhinnery @andrewryno
from twilio-video-app-react.
IN
src/components/MainParticipantInfo/MainParticipantInfo.tsx
add Participant type
interface MainParticipantInfoProps { participant: LocalParticipant | RemoteParticipant | Participant; children: React.ReactNode; }
And
src/components/ParticipantTracks/ParticipantTracks.tsx
add Participant type
interface ParticipantTracksProps { participant: LocalParticipant | RemoteParticipant | Participant; disableAudio?: boolean; enableScreenShare?: boolean; videoPriority?: Track.Priority; }
will throw another issue in
src/hooks/useScreenShareParticipant/useScreenShareParticipant.tsx
change Array type to any and parameter type to any in the find function
setScreenShareParticipant( Array.from<any>(room.participants.values()) // the screenshare participant could be the localParticipant .concat(room.localParticipant) .find((participant: any) => Array.from<TrackPublication>(participant.tracks.values()).find(track => track.trackName === 'screen') ) );
from twilio-video-app-react.
Hey everyone. Thanks for the info!
I am able to reproduce this issue when I run
yarn install
instead ofnpm install
. However everything works correctly when I runnpm install
.@ahmedmgh67 @osamaKu - Are you using yarn or npm to install dependencies? Does the app build correctly if you use npm?
It seems the problem has to do with the version of typescript installed. Npm will install version 3.7.5, because this is what is specified in the
package-lock.json
file.Yarn ignores
package-lock.json
, and there is noyarn.lock
file, so yarn installs a newer version of Typescript - version 3.8.3. This app hasn't yet been tested with version 3.8.3 of typescript and it seems to cause the above mentioned problems, which I'll look into this week.If you still want to use yarn, try running the
yarn import
command. This will usepackage-lock.json
to generate ayarn.lock
file.
Hi @timmydoza
first I use yarn to install dependencies, I get this issue with typescript v 3.7.5, then I removed node_modules and yarn.lock, package-lock.json and tried with NPM, I get the same problem, I solved this issue as I explained above
from twilio-video-app-react.
TIL that yarn import
exists. Thank you @timmydoza!
I was able to successfully build and deploy the project using the project's provided directions for npm
. After doing so with npm
, I was then also able to build and deploy the project by running yarn import
then yarn run deploy:twilio-cli --override
.
from twilio-video-app-react.
Same here. Cannot compile with identical error. Had to downgrade typescript to 3.7.5.
from twilio-video-app-react.
Related Issues (20)
- twilio-video upgrade HOT 1
- Second participant audio is not playing on first participant screen HOT 2
- WhiteBoard Feature HOT 2
- waiting room HOT 1
- document and present Capability HOT 1
- token generation failed overall but also succeeded intermittently. HOT 1
- Screen sharing audio capabilities and the ability to see your own shared content. HOT 1
- Error when attempting to build local server HOT 1
- The request body is undefined unless we add bodyParser or express.json
- Camera light remains open once user disconnects from the room HOT 6
- Using WebAudio - AudioWorkletProcessors to process Audio Data
- Transcribing calls
- Upgrade security of the app with a token from our server. Passcode gets in the way when the app is deployed. HOT 1
- what is the use of web sockets
- Passcode starting with number '0' causes a bad passcode error.
- A thumbs up appears in the middle of the screen... HOT 1
- Mac OS Safari Screen Sharing performance degrades during recording
- Refactoring of code smells
- can anyone tell me what is the issue in me code
- Download the attachement added in the chat
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twilio-video-app-react.