-
Notifications
You must be signed in to change notification settings - Fork 10
kurento-client-core: Cannot find module 'async' #624
Description
Prerequisites
These are MANDATORY, otherwise the issue will be automatically closed.
- I agree to fill this issue template.
- I have read the Troubleshooting Guide and Support Instructions.
Issue description
kurento-client depends on kurento-client-core which depends on the module async. However, since many modules may depend on async and very few others will depend on kurento-client-core you will often find yourself in a situation where async is installed in the kurent-client directory rather than your app's node_modules and kurento-client-core will not be able to import it properly.
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'async'
Require stack:
- /var/my-app/node_modules/kurento-client-core/lib/abstracts/MediaElement.js
- /var/my-app/node_modules/kurento-client-core/lib/HubPort.js
- /var/my-app/node_modules/kurento-client-core/lib/index.js
- /var/my-app/node_modules/kurento-client/lib/KurentoClient.js
- /var/my-app/node_modules/kurento-client/lib/index.js
- /var/my-app/main.js
Context
How to reproduce?
Create a project and install both portfinder and kurento-client-core which require different versions of async. You will likely end up with a node_modules that looks like this:
my_app/node_modules/
- kurento-client
- async
- kurento-client-core
- portfinder
- async
When kurento-client-core attempts to require("async") it will not be found.
Expected & current behavior
(Optional) Possible solution
kurento-client-core package.json should declare its dependency on async (or async should no longer be depended on)
Info about your environment
kurento-client: 6.16.0
npm: 8.8.0
About Kurento Media Server
- Kurento version:
- Server OS:
- Installation method:
About your Application Server
- Programming Language: node
- Kurento Client version: 6.16.0
About end-user clients
- Device(s):
- OS(es):
- Browser(s):
Run these commands
cat /etc/lsb-release
kurento-media-server --version
dpkg -l | grep -Pi 'kurento|kms-|gst.*1.5|nice'