kalix.Annotations not found


I’m new to Kalix and I’m trying to build the Javascript shopping-cart example and when running npm run build I end up with this:

Building Typescript definitions from static JS with command: C:\data\kalix\shopping-cart\node_modules.bin\pbts C:\data\kalix\shopping-cart\lib\generated\proto.js -o C:\data\kalix\shopping-cart\lib\generated\proto.d.ts
installing estraverse@^5.1.0
Invoking Kalix codegen with command: C:\data\kalix\shopping-cart\node_modules@kalix-io\kalix-scripts\bin\kalix-codegen-js.bin --proto-source-dir ./proto --source-dir ./src --generated-source-dir ./lib/generated --test-source-dir ./test --integration-test-source-dir ./integration-test
Inspecting proto file descriptor for Kalix code generation…
Exception in thread “main” java.lang.NoClassDefFoundError: kalix.Annotations
at io.kalix.codegen.DescriptorSet$.$anonfun$fileDescriptors$2(DescriptorSet.scala:45)
at scala.util.Using$.$anonfun$apply$1(Using.scala:261)
at scala.util.Using$.apply(Using.scala:113)
at io.kalix.codegen.DescriptorSet$.fileDescriptors(DescriptorSet.scala:43)
at io.kalix.codegen.js.Cli$.main(Cli.scala:85)
at io.kalix.codegen.js.Cli.main(Cli.scala)
Running Invoking Kalix codegen failed, process: [C:\data\kalix\shopping-cart\node_modules@kalix-io\kalix-scripts\bin\kalix-codegen-js.bin], args: [–proto-source-dir,./proto,–source-dir,./src,–generated-source-dir,./lib/generated,–test-source-dir,./test,–integration-test-source-dir,./integration-test]

I tried to search it from net but no hits at all for kalix.Annotations.

Could you please help me to understand what is now wrong here?


BR, Timo

In addition to that, this works if this is done on Linux or on Mac, but fails on Windows. Is it supposed to run on Windows?

Hi, @timotapjunt, sorry to hear you are hitting problems.

It is supposed to work on windows, so I think there is a bug in the code generator when running on windows. I have created an issue in the JS/TS SDK tracker for this, if you figure out any additional details, please comment on the issue: Codegen failing on windows · Issue #442 · lightbend/kalix-javascript-sdk · GitHub