Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
48 Views

JS SDK 4.0 require failed

Ive download JS SDK 4.0 and put it on simple script:

/*global require, __dirname, console, process*/
'use strict';
var N = require('./ics')

 

But when im trying to run this script i have an error:

node test.js
/home/ubuntu/Release-v4.0/extras/tcast-conference-server-nodejs/ics.js:9
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Ics=e()}}(function(){return function(){return function e(t,n,i){function r(a,s){if(!n){if(!t){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var u=new Er...={exports:{}};t[0].call(d.exports,function(e){return r(t[1]||e)},d,d.exports,e,t,n,i)}return n.exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i);return r}}()({1:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.B...

ReferenceError: window is not defined
    at /home/ubuntu/Release-v4.0/extras/tcast-conference-server-nodejs/ics.js:9:5400
    at Object.5 (/home/ubuntu/Release-v4.0/extras/tcast-conference-server-nodejs/ics.js:9:5753)
    at r (/home/ubuntu/Release-v4.0/extras/tcast-conference-server-nodejs/ics.js:9:556)
    at /home/ubuntu/Release-v4.0/extras/tcast-conference-server-nodejs/ics.js:9:590
    at Object.7../logger.js (/home/ubuntu/Release-v4.0/extras/tcast-conference-server-nodejs/ics.js:9:6904)
    at r (/home/ubuntu/Release-v4.0/extras/tcast-conference-server-nodejs/ics.js:9:556)
    at /home/ubuntu/Release-v4.0/extras/tcast-conference-server-nodejs/ics.js:9:590
    at Object.4../mediaformat.js (/home/ubuntu/Release-v4.0/extras/tcast-conference-server-nodejs/ics.js:9:4650)
    at r (/home/ubuntu/Release-v4.0/extras/tcast-conference-server-nodejs/ics.js:9:556)
    at /home/ubuntu/Release-v4.0/extras/tcast-conference-server-nodejs/ics.js:9:590

 

Did i need to install something or i just miss something? ( ive checked with prev version(3.5.2, nuve.js) - everything works fine)

Tags (2)
0 Kudos
4 Replies
Highlighted
48 Views

adapter.js and socket.io.js added to script - same error

0 Kudos
Highlighted
48 Views

Did you run your code in browsers? As the error showed Windows is defined in browser and it cannot be found in your environment

0 Kudos
Highlighted
48 Views

nope, ive tried run this script on server with "node" command ( previous version = nuve.js) is working fine. Reason why im not using browser cuase we already have our custom app  and we want to upgrade it to ver.4

0 Kudos
Highlighted
48 Views

Hi, how do you use nuve.js in 3.5? to manage room related resources? If so you can use rest.js in 4.0, please refer to our document.

0 Kudos