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

[preset] edgio preset isn't compatible with new edgio apps #1405

Open
Hebilicious opened this issue Jul 8, 2023 · 0 comments · May be fixed by #2067
Open

[preset] edgio preset isn't compatible with new edgio apps #1405

Hebilicious opened this issue Jul 8, 2023 · 0 comments · May be fixed by #2067
Labels
bug Something isn't working preset:layer0

Comments

@Hebilicious
Copy link
Member

Hebilicious commented Jul 8, 2023

After investigating this preset, I found out it no longer works.
It looks like it's no longer possible to create v6, and v7 is required with new projects.
Therefore the current preset which use v6 and cli v6 is broken:

v6

npx edgio deploy --team=UnJs --site=nitro-deployment --token=$EDGIO_DEPLOY_TOKEN     
WARNING: edgio platform serverless runtime supports only Node.js v16. Your current version is v20.2.0.
If your backend code (SSR, Api endpoints, etc.) uses Node.js v20.2.0 features it may not work as expected once deployed on the edgio platform.
🔑 Incorrect apiKey.


Deploy token is invalid or disabled!

v7

npx edgio deploy --property=nitro-deployment --token=$EDGIO_DEPLOY_TOKEN

WARNING: edgio platform serverless runtime supports only Node.js v16. Your current version is v20.2.0.
If your backend code (SSR, Api endpoints, etc.) uses Node.js v20.2.0 features it may not work as expected once deployed on the edgio platform.
🔑 Logged in as "test2" deploy token of site "nitro-deployment".

📋 Deploying to:
> Team: unjs
> Property: nitro-deployment
> branch: edgio
> Environment: default
> Edgio version: 7.0.24
> Commit URL: https://github.com/unjs/nitro-deploys/commit/34bf6dbc08c7fc07211f7525abc1e0b06e0b9b1b
> Deployment #1

🛠️  Building your app for deployment on Edgio
> Bundling router... done.

TypeError: router.fallback is not a function

The v7 upgrade is a breaking change and current Nitro preset doesn't work anymore. I assume no-one uses this preset hence why it's not noticeable (the edgio CLI doesn't use it and edgio users probably use that).

I don't have a way to test v6 apps and the old preset, but we need to either update it to v7 or create a new one and warn that the old one doesn't work for new apps anymore.

It looks like we can/should use their undocumented nitropack connector for Nitro standalone.

For Nuxt we need to use a separated connector.

For the preset implementation, if we follow their instructions we can just run npx edgio init && npx edgio build in the preset, which should auto-detect the framework and use the appropriate connector. Otherwise we're gonna have to manually create all the necessary files, which seems a bad idea as this will need be harder to maintain.
We can create the app in .output, and tell people to run npx edgio init && npx edgio build.

After some testing, I found out that npx edgio init doesn't detect nitropack so we would need to handle this manually.
Maybe the edgio team can help here.

Originally posted by @Hebilicious in unjs/nitro-deploys#61 (comment)

@Hebilicious Hebilicious added bug Something isn't working preset:layer0 labels Jul 8, 2023
@DemoMacro DemoMacro linked a pull request Jan 10, 2024 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working preset:layer0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant