Skip to content
This repository was archived by the owner on Jul 12, 2023. It is now read-only.
This repository was archived by the owner on Jul 12, 2023. It is now read-only.

kurento-client-core: Cannot find module 'async' #624

@joeflateau

Description

@joeflateau

Prerequisites

These are MANDATORY, otherwise the issue will be automatically closed.

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

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    known-issuesKnown issues that users find frequently

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions