netzo / fresh-netzo

Full-stack Deno Fresh meta-framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
https://netzo.io
MIT License
52 stars 2 forks source link

Reed's platform feedback #129

Open deer opened 7 months ago

deer commented 7 months ago

I just tried creating a project and deploying it. Things could have gone better :(

I tried using the UID, but I got this:

  netzo deploy --project great-worm-24
  ✖ Project deployments details not found.

Once I switched to using the longer ID which is impossible to remember, this happened:

netzo deploy --project=65cc95bf32ab0e0200493bed
✔ Project: test
ℹ Empty project detected, automatically pushing initial deployment to production (use --production for further updates).
ℹ Uploading all files from the current dir (/Users/reed/code/netzo/minimal)
✔ Found 8 assets.
Warning: Not implemented: ClientRequest.options.createConnection
✖ Deployment failed.

error: The deployment failed: Module not found "file:///Users/reed/code/netzo/netzo/lib/mod.ts".

So it looks like deploying with a locally installed CLI isn't easy (is impossible?). I haven't tried running the deployment command directly from the CLI, i.e. something like deno run -A netzo/cli.ts do_the_other_stuff_Here, but I guess that would fail with a similar error.

After encountering the same error after installing the CLI, I realized it was because I had initialized my project with the local CLI, so my deno.json is incorrect (or at least not compatible with the deploy command).

After changing my deno.json and testing locally via deno task start, I see the following in my terminal:

https://deno.land/x/netzo@0.4.37/deps/$fresh/runtime.ts

That doesn't look good... Even if it works (because I see ./lib/deps/$fresh in the netzo project), it doesn't seem like the right thing to be doing.

So now I'm ready to start deploying. Unfortunately I now receive:

netzo deploy --project=65cc95bf32ab0e0200493bed
✔ Project: test
ℹ Uploading all files from the current dir (/Users/reed/code/netzo/minimal)
✔ Found 8 assets.
Warning: Not implemented: ClientRequest.options.createConnection
✔ Packaging complete
✖ Deployment failed.

error: The deployment failed: UNCAUGHT_EXCEPTION

TypeError: module not found: 'https://deno.land/x/netzo@0.4.37/components/layout/footer.tsx'
    at async extractRoutes (https://deno.land/x/fresh@1.6.3/src/server/fs_extract.ts:249:22)
    at async getServerContext (https://deno.land/x/fresh@1.6.3/src/server/context.ts:82:25)
    at async start (https://deno.land/x/fresh@1.6.3/src/server/mod.ts:110:15)

So then I delete my entire project and re-initialize (this time it's using the pinned remote 0.4.37 CLI). I try again:

netzo deploy --project=65cc95bf32ab0e0200493bed
✔ Project: test
ℹ Uploading all files from the current dir (/Users/reed/code/netzo/minimal)
✔ Found 8 assets.
Warning: Not implemented: ClientRequest.options.createConnection
✔ Packaging complete
✖ Deployment failed.

error: The deployment failed: UNCAUGHT_EXCEPTION

TypeError: module not found: 'https://deno.land/x/netzo@0.4.37/components/layout/footer.tsx'
    at async extractRoutes (https://deno.land/x/fresh@1.6.3/src/server/fs_extract.ts:249:22)
    at async getServerContext (https://deno.land/x/fresh@1.6.3/src/server/context.ts:82:25)
    at async start (https://deno.land/x/fresh@1.6.3/src/server/mod.ts:110:15)

At this point I'm too tired to continue further, so I'll stop here. It seems like we quite urgently need a test that asserts that deploying is possible, in addition to issues for all the other problems I encountered here.

miguelrk commented 7 months ago

Thanks for this! I'll try to comment on these points in order...