Closed migsar closed 1 month ago
Thanks for reporting this, I have opened a PR to fix the template and also test in ci
to catch any future regressions. Once you add a new component, you would need to do a npm install
in that component to auto-update the contents of the knitwit.json
.
I will retag the templates once the PR merges.
I will tag the template soon but to update your templates in the meantime you can run:
spin templates install --update --git https://github.com/fermyon/spin-js-sdk
@karthik2804 even after installing the template as you mention all of this is happening. Oh, ok, I saw the fix now, I've not tested after it.
My apologies for closing the issue - I forgot that it was linked to the PR. I am a little surprised since I added a test to CI to test the TypeScript Templates here.
I did not see the edit but please reopen the issue if it is not solved.
Oh I have not pushed the tag yet so if you are not spin
from main
it will still be broken. I will update soon.
I have just pushed the tag. Updating to the latest templates should fix it. If not, can you share the version of node
you are using. Thanks!
I tried to add a component to an existing project. After running the command the app doesn't run, there are two problems.
spin.toml
is non-conformant.I was expecting something like
but instead got:
I think the problem is the content of https://github.com/fermyon/spin-js-sdk/blob/main/templates/http-ts/metadata/snippets/component.txt, by comparing with the template for js.
knitwit.json
:I am not sure if the solution is just to add those in the template or should be generated automatically.