Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reed's platform feedback #129

Open
deer opened this issue Feb 14, 2024 · 1 comment
Open

Reed's platform feedback #129

deer opened this issue Feb 14, 2024 · 1 comment

Comments

@deer
Copy link
Contributor

deer commented Feb 14, 2024

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
Copy link
Contributor

miguelrk commented Feb 14, 2024

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

  • The --project flag expects an ID currently. It used to expect a UID, but we dropped this (since most of the time its still hard-enough to remember) in favor of either the NETZO_PROJECT_ID env var (reads also from the .env) if any) or completely omitting it by simply doing netzo deploy and selecting it from the interactive prompt (landed in https://github.com/netzo/netzo/releases/tag/0.4.33). As a side note, I believe Deno.args requires an = sign e.g. --project=PROJECT_ID in case you missed it

  • 😟 Hadn't tried to deploy since merging chore: refactor cli to support local cloning #95 and fix: improve deno.json generation #109 but I suspect something there broke deployments. They worked totally fine before. Can't comment further on this, but this is pretty critical, I'll get to debugging this now.

  • Agreed, a test for netzo deploy (like we now have for netzo init) would be very welcome to ensure not only projects can be initialized, but also deployed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants