`joy create route` fails due to nil response from `route-string`
acaird opened this issue · comments
Andrew Caird commented
joy create route
fails with the error:
error: bad slot #1, expected string|symbol|keyword|buffer, got nil
in file/write
in <anonymous> [/usr/local/Cellar/janet/1.8.1/lib/janet/joy/cli/routes.janet] on line 112, column 7
in create [/usr/local/Cellar/janet/1.8.1/lib/janet/joy/cli/routes.janet] (tailcall) on line 111, column 5
because route-string
is returning nil
. Adding a few print statements to create
:
(print "Table Name: " table-name)
(print "Route String: " route-textstring)
right after the let
results in:
% joy create route account
Table Name: account
Route String: nil
I don't know Janet, but it looks like columns
goes out of scope before the end of the function.
Anyhow, what am I missing?
swlkr commented
You weren't missing anything, I was returning nil from the route-string
function, woops!
If you pull latest by changing your project.janet
to look like this:
(declare-project
:name "<your project>"
:description ""
:dependencies ["https://github.com/joy-framework/joy"]
:author ""
:license ""
:url ""
:repo "")
Instead of using a git tag, and re-rerun jpm deps
then it should work 👍
Andrew Caird commented
Thank you!