kurento-client-js : require('kurento-client-core').abstracts is undefined

200 views
Skip to first unread message

2owl...@gmail.com

unread,
Nov 10, 2016, 5:28:13 PM11/10/16
to kurento

hi folks, we are integrating kurento into a webpack js project but am getting the following in my chrome console


     KurentoClient.js:46 Uncaught TypeError: Cannot read property 'MediaObject' of undefined


the error is from KurentoClient.js .. on the require call to core


     var MediaObject = require('kurento-client-core').abstracts.MediaObject;


The npm package.json deps look like this


     "dependencies": {

        "kurento-client": "6.6.0",

         "kurento-utils": "^6.6.1"

       }



the includes in my js file look like this .. 


var kurentoClientCore = require('kurento-client-core');

var kurentoClient = require('kurento-client');

var kurentoUtils = require('kurento-utils');




let me know if you need anything else .. I'm still poking around


thanks,

C



jo...@brewerdigital.com

unread,
Nov 11, 2016, 9:42:42 AM11/11/16
to kurento
+1 I'm seeing this same issue.

jo...@brewerdigital.com

unread,
Nov 11, 2016, 12:46:51 PM11/11/16
to kurento
I was able to solve this via building the browser-side code and embedding the script. The problem was I was trying to use the node version of the client on the browser-side.

Sudharsan Vijayan

unread,
Sep 27, 2017, 2:49:38 AM9/27/17
to kurento
can you elaborate and help me with this please

Cinxgler Mariaca Minda

unread,
Mar 31, 2020, 7:53:46 PM3/31/20
to kurento
I solved in my NUXT/Vue + Yarn project by adding this in package.json

"dependencies": {
"@bower_components/kurento-client": "Kurento/kurento-client-bower#master",
"@bower_components/kurento-utils": "Kurento/kurento-utils-bower#master",
...
},


Then in my script I imported those libraries:

import kurentoUtils from "@bower_components/kurento-utils/js/kurento-utils"
import "@bower_components/kurento-client/js/kurento-client"

Hope it helps


Reply all
Reply to author
Forward
0 new messages