Closed andyfangaf closed 4 years ago
Thanks for the issue @fandy!
The code you provided looks ok. I am able to reproduce the same error when I try to run the code without twilio-video
installed. Could you please confirm that you have installed twilio-video
?
npm i -S twilio-video
Hi @timmydoza , yes I have twilio-video
installed, which is why it was confusing me. 🤔
Would you mind confirming that twilio-video
is installed in the correct location? The package.json
of your next.js app should have it listed:
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"next": "9.3.5",
"react": "16.13.1",
"react-dom": "16.13.1",
"twilio-video": "^2.3.0"
}
}
I'm only asking because I get an error that is identical to the one you posted when I run npm run dev
after uninstalling twilio-video
.
Yes my package.json has twilio-video@^2.3.0
as a dependency and @types/twilio-video@^2.0.12
as a dev dependency.
Unfortunately, I'm unable to reproduce your issue with twilio-video
installed.
I'm not sure what to suggest without more information. It is possible for you to provide a full reproducible example? It could be a link to a github repo, or even a next.js project on codesandbox.io. It would be helpful if we could see the entire codebase, so we could look at things like directory structure and config files. Also, could you please let us know what version of node and npm (or yarn) you are using?
Thanks for the info!
I got the same error when I installed @types/twilio-video, Once I removed @types/twilio-video I don't get this error. But I need @types/twilio-video when developing so I need to re-install it when dev and remove when I run the project to test. it is a little bit confusing.
Hi @anasappsaya ,
I think your issue should be fixed if you install @types/twilio-video
as a dependency instead of a dev dependency, like we do in our React-based Collaboration App.
Thanks,
Manjesh Malavalli JSDK Team
@manjeshbhargav I have the same issue as @anasappsaya and others.
Primarily a vue-cli application. It doesn't matter if I put @types/twilio-video
as a dependency or devDependency, the outcome is the same - "can't resolve 'twilio-video' module in ...".
This is a newly added dependency to a 3 year old TypeScript project. I'm not sure where I'm going wrong, but I don't have issues with the 10+ other @types/...
modules I have to install to devDependencies.
Code to reproduce the issue:
Expected behavior:
Can import the module, as the code is straightforward.
TODO
Actual behavior:
I get this error:
TODO
Software versions: