Legacy Dev Forum Posts

 View Only

Sign Up

Platform API Client SDK - JavaScript Error in browser

  • 1.  Platform API Client SDK - JavaScript Error in browser

    Posted 06-05-2025 18:02

    yuezhong | 2021-05-11 06:46:14 UTC | #1

    Hi

    I'm building a Vue 3 app, installed the sdk 113.0.0 npm install purecloud-platform-client-v2

    in my code import platformClient from "purecloud-platform-client-v2";

    I encountered the following error

    Uncaught TypeError: Cannot read property 'indexOf' of undefined at module.exports (has-flag.js:30) at supports-colors.js:34 at purecloud-platform-client-v2.js?v=38c0b7e9:12 at colors.js:41 at purecloud-platform-client-v2.js?v=38c0b7e9:12 at safe.js:9 at purecloud-platform-client-v2.js?v=38c0b7e9:12 at colorize.js:9 at purecloud-platform-client-v2.js?v=38c0b7e9:12 at levels.js:3 module.exports @ has-flag.js:30 (anonymous) @ supports-colors.js:34 (anonymous) @ purecloud-platform-client-v2.js?v=38c0b7e9:12 (anonymous) @ colors.js:41 (anonymous) @ purecloud-platform-client-v2.js?v=38c0b7e9:12 (anonymous) @ safe.js:9 (anonymous) @ purecloud-platform-client-v2.js?v=38c0b7e9:12 (anonymous) @ colorize.js:9 (anonymous) @ purecloud-platform-client-v2.js?v=38c0b7e9:12 (anonymous) @ levels.js:3 (anonymous) @ purecloud-platform-client-v2.js?v=38c0b7e9:12 (anonymous) @ browser.js:17 (anonymous) @ purecloud-platform-client-v2.js?v=38c0b7e9:12 (anonymous) @ winston.js:9 (anonymous) @ purecloud-platform-client-v2.js?v=38c0b7e9:12 (anonymous) @ logger.js:1

    the above error doesn't occur in SDK 109.

    thanks Yuezhong


    anon11147534 | 2021-05-11 08:50:43 UTC | #2

    Hi Yuezhong,

    This appears to be a regression introduced with the logging and configuration changes released yesterday. I've reverted the changes and published a build with version 113.1.0. We'll redeploy the logging and configuration updates when a bug fix has been implemented.


    yuezhong | 2021-05-12 04:02:21 UTC | #3

    Hi Ronan

    Thank you!

    Yuezhong


    system | 2021-06-12 04:02:24 UTC | #4

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 10877