You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using 'twilio-taskrouter' v2.0.3 npm package in Angular v17 app.
Getting error on accessing the app from browser:
at node_modules/util/util.js (util.js:109:1)
at __require (chunk-ZTDPENTR.js?v=8eb4eef9:38:50)
at 6464 (index.window.js:3:115268)
at r2 (index.window.js:3:119424)
at 5600 (index.window.js:3:108312)
at r2 (index.window.js:3:119424)
at 568 (index.window.js:3:95429)
at r2 (index.window.js:3:119424)
at 6427 (index.window.js:3:97502)
at r2 (index.window.js:3:119424)
I have debugged this further, twilio-taskrouter is importing 'util' package, which tries to access the (Node) 'process' variable:
if (process.env.NODE_DEBUG) {
var debugEnv = process.env.NODE_DEBUG;
debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, '\\$&')
.replace(/\*/g, '.*')
.replace(/,/g, '$|^')
.toUpperCase();
debugEnvRegex = new RegExp('^' + debugEnv + '$', 'i');
}
The text was updated successfully, but these errors were encountered:
Hello @pras-bot.
Thanks for highlighting this.
From what I can see, there's no mention of process.env inside the distribution folder of the [email protected] package.
I'm assuming your errors might come from a TypeScript compiler when processing the third party modules in use by the twilio-taskrouter package.
I would suggest you to enable the skipLibCheck flag under your tsconfig.json and see if that helps in mitigating the problem.
Also, since you mention the problem is showing when consuming twilio-taskrouter v2.0.3, can you please specify if the same problem is also visible when reverting the package to an older version?
I am using 'twilio-taskrouter' v2.0.3 npm package in Angular v17 app.
Getting error on accessing the app from browser:
I have debugged this further, twilio-taskrouter is importing 'util' package, which tries to access the (Node) 'process' variable:
The text was updated successfully, but these errors were encountered: