Hi! I have a problem with the Multiplatform JS set...
# multiplatform
c
Hi! I have a problem with the Multiplatform JS setup (with the Gradle plugin). When running:
./gradlew jsTest
I get:
Copy code
> Task :kotlinNpmInstall FAILED
error package.json: Name contains illegal characters
I tracked it down to this GitHub issue: https://github.com/yarnpkg/yarn/issues/1120 which says it's a problem of whitespace character in the project name. I do have whitespace in the name of my project, since that's allowed with Gradle—but apparently it's not with Yarn. Is there a way to tell the Multiplatform plugin to escape the whitespace with something else (for example underscores) automatically? I found the generated
package.json
in
build/js/package.json
and the name of the project does contain spaces there as well.
👍 1
e
Probably easier to just remove the spaces from the project name? Hyphens work just fine.
👍 1
c
That's what I did for the meantime, but it creates inconsistencies in the naming of the projects in the company... I guess it's not that bad of a problem but since the fix is fairly easy on the plugin's side it'd be nice if it happened
i
c
Thanks, only two votes though...