I want to import a local npm package into my kotlin project but I get the error Can't add "convert": invalid package version "".
File structure:
project
- js
- package.json
- convert.js
- src
- build.gradle.kts
My build.gradle.kts
:
plugins {
kotlin("js")
}
dependencies {
implementation(npm("convert", "file:../../../../wikimarkup-converter/js"))
}
configureKotlinJs()
configurePublication()
My path is correct, because it gives me another error when it's any different.
My package.json
{
"name": "convert",
"main": "convert.js",
"dependencies": {
...
}
}
When I set a version "1.0"
in my package.json
I get the error
Can't add "convert": invalid package version "1.0".
in Gradle. So whatever version is in there is invalid.
I know there is a similar question, but it has no answers, and the issue is completely different.