While running test for JS target got this message:...
# javascript
p
While running test for JS target got this message:
Copy code
> Task :my-project:jsBrowserTest
Instead change the require of /home/user/my-project/build/js/node_modules/strip-ansi/index.js in /home/user/my-project/build/js/node_modules/string-width/index.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/home/user/my-project/build/js/node_modules/string-width/index.js:2:19) {
How to fix it? Gradle config for Js target:
Copy code
js {
    browser {
        testTask {
            useKarma {
                useFirefoxHeadless()
            }
        }
    }
    useEsModules() // with useCommonJs() there is the same message 
    binaries.library()
}
Kotlin version: 2.0.20-Beta2
b
Could you please share your project here, or create an ticket?