```> Task :kotlinNpmInstall FAILED error packag...
# javascript
t
Copy code
> Task :kotlinNpmInstall FAILED
error package.json: Name contains illegal characters
Any idea what to do? it's the autogenerated package.json (i suspect) from the kotlin compiler. im clueless what to do now ;(
w
can you send here the generated package.json?
r
what's your project name?
t
Copy code
{
  "private": true,
  "workspaces": [
    "packages/SomeName SomeOtherName Shared Kernel",
    "packages/SomeName SomeOtherName Shared Kernel-test",
    "packages_imported/klock-root-klock/1.8.1",
    "packages_imported/kotlin/1.3.70",
    "packages_imported/assertk/0.20.0",
    "packages_imported/opentest4k/1.1.3",
    "packages_imported/kotlin-test-nodejs-runner/1.3.40",
    "packages_imported/kotlin-test/1.3.70",
    "packages_imported/kotlinx-serialization-kotlinx-serialization-runtime/0.20.0",
    "packages_imported/kotlin-test-js-runner/1.3.70"
  ],
  "devDependencies": {},
  "dependencies": {},
  "peerDependencies": {},
  "optionalDependencies": {},
  "bundledDependencies": [],
  "name": "SomeName SomeOtherName Shared Kernel",
  "version": "0.2.0"
}
side note: only happens on jenkins. locally - no problem
(as always, right? 😉 )
w
try to remove whitespaces and caps letters from the name
t
i wonder why they are there at all
when executed locally they do not appear
the name generated locally is only 'shared-kernel'
i realize, the name seems to mirror the name of the folder - is that correct?!
r
if it's not set explicitly
i
You can set
rootProject.name
in
settings.gradle
file, and it will be get
☝🏻 1
😂 1
t
good lord... thank you 🙂
a
at work, we insist that all Gradle projects must have a settings.gradle/settings.gradle.kts and set at least rootProject.name
otherwise if you follow the defaults, the directory name will flow into jar names, probably module names etc
124 Views