imscJS icon indicating copy to clipboard operation
imscJS copied to clipboard

Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'imscISD')

Open abhidev54 opened this issue 2 years ago • 4 comments

Hi Team,

I am using one library which internally uses imscjs library for CC handling. I am getting below error, do you know how to resolve or ignore this error ?

Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'imscISD') at 2206 (isd.js:809:42) at t (bootstrap:19:32) at 89953 (main.js:27:23) at t (bootstrap:19:32) at 69785 (hotkeys.esm.js:619:1) at t (bootstrap:19:32) at sharing:42:435 at t.m. (consumes:196:23) at t (bootstrap:19:32) at 46463 (8052.ff23f179.chunk.js:1:2899)

isd.js is creating issue, below is problematic code snippet, I am not even calling this file but somehow it get triggered, since imscISD is not defined globally, it is throwing error. (typeof exports === 'undefined' ? this.imscISD = {} : exports, typeof imscNames === 'undefined' ? require("./names") : imscNames, typeof imscStyles === 'undefined' ? require("./styles") : imscStyles, typeof imscUtils === 'undefined' ? require("./utils") : imscUtils );

can you please suggest if you have came across same issue earlier.

Regards. Abhishek

abhidev54 avatar Jan 18 '24 08:01 abhidev54

Can you provide more details on your runtime and development environment?

palemieux avatar Jan 18 '24 17:01 palemieux

Hi @palemieux ,

Actually I am deploying on AWS using Jenkins and building using webpack.

abhidev54 avatar Jan 20 '24 20:01 abhidev54

imscJS is built using browserify, so there might be an incompatibility somewhere. Are you packaging imsc.js using webpack or building imsc.js using webpack?

palemieux avatar Jan 26 '24 20:01 palemieux

@abhidev54 Does the proposed move to ES6 resolve your issue?

palemieux avatar May 02 '24 16:05 palemieux