Empty package (no executables) #68
-
In the following project: When I push a package to NPM, it seems empty. No binary code. I do export a single class: In the build/packages/js I have all the files I need. They are just not included in the final package. |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments
-
You register a new package and do not attach any files to it. The plugin autoconfugures packages for all js targets if detected, so instead of registering a new package, try named("js") {} |
Beta Was this translation helpful? Give feedback.
-
I'm closing this as it seems to be a misunderstanding rather than a bug. Feel free to continue the conversation here anyways if you still need help. |
Beta Was this translation helpful? Give feedback.
-
I changed the name from "js", due to the following error: Build file '/Users/marcinmoskala/Projekty/AnkiMarkdown/build.gradle.kts' line: 77 Cannot add a NpmPackage with name 'js' as a NpmPackage with that name already exists. |
Beta Was this translation helpful? Give feedback.
-
You changed the name, but not the function. Just remove your packages block and it should work just fine |
Beta Was this translation helpful? Give feedback.
-
Without packages, how can I change When I changed to that:
The problem is that the package name is AnkiMarkdown, not ankimarkdown as it should be. |
Beta Was this translation helpful? Give feedback.
-
Ah, then instead of using register("pkgName"){} use named("pkgName") {} to configure an existing package instead of creating it. |
Beta Was this translation helpful? Give feedback.
-
Perfect, that works, thank you :) |
Beta Was this translation helpful? Give feedback.
-
Glad you got it working in the end. Pro tip, you can use npmjs() registry shortcut for more concise setup |
Beta Was this translation helpful? Give feedback.
You register a new package and do not attach any files to it. The plugin autoconfugures packages for all js targets if detected, so instead of registering a new package, try named("js") {}