Comments (11)
my route rules ✅
- / -> prerender
- /** -> SSR
On AWS amplify
pointing /
to /index.html
works for me but if i remove this redirect rule i get the 500 no such file or directory, open '/static/index.html'
from nuxt.
I was using universal rendering in my Nuxt app. I had the homepage «/» with « { prerender: true } » and the rest of the app use classic SSR rendering. Unfortunately when doing this the Nuxt config for Amplify provided by the docs don’t seem to work correctly and the home page was not generated or amplify was not finding it…
To solve the issue I simply disabled prerendring for the time being.
from nuxt.
I had the same issue, for me I just had to disable the prerendered routes in nuxt.config.ts
before disable
nitro: {
esbuild: {
options: {
target: 'esnext',
},
},
prerender: {
crawlLinks: false,
routes: ['/'],
ignore: ['/hi'],
},
},
after disable
nitro: {
esbuild: {
options: {
target: 'esnext',
},
},
prerender: {
crawlLinks: false,
routes: [], // No routes listed for prerendering
ignore: ['/hi'],
},
},
from nuxt.
I've run into this same issue described. It's a shame that it doesn't appear to be something that can just be solved with configuration. Many people asking for years about a way to control amplify "Rewrites and redirects" via config: aws-amplify/amplify-hosting#18
If that ever happened, then you could handle it yourself in config... or nuxt could possibly even hook into this such that routes with redirect: true could be automatically set when using AWS.
Anyone else have any solutions they have used with aws amplify and many prerender routes?
from nuxt.
The issue was the prerender config for pages that does not seem to work on amplify
from nuxt.
The issue was the prerender config for pages that does not seem to work on amplify
Could you clarify? How did you solve the issue?
from nuxt.
Would you see if you can reproduce this in pure Nitro (reproduction sandbox), and if so, raise there? 🙏
from nuxt.
Would you be able to provide a reproduction? 🙏
More info
Why do I need to provide a reproduction?
Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making.
What will happen?
If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritize it based on its severity and how many people we think it might affect.
If needs reproduction
labeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it.
How can I create a reproduction?
We have a couple of templates for starting with a minimal reproduction:
👉 https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz
👉 https://codesandbox.io/s/github/nuxt/starter/v3-codesandbox
A public GitHub repository is also perfect. 👌
Please ensure that the reproduction is as minimal as possible. See more details in our guide.
You might also find these other articles interesting and/or helpful:
from nuxt.
This issue was closed because it was open for 7 days without a reproduction.
from nuxt.
Same problem here
[500] ENOENT: no such file or directory, open '/static/index.html'
[500] ENOENT: no such file or directory, open '/static/api/_content/navigation/u7BbTyuhiE.1709570464844.json'
[500] ENOENT: no such file or directory, open '/static/api/_content/navigation/u7BbTyuhiE.1709570464844.json'
// build logs
Initializing prerenderer
Prerendering 6 routes
├─ /docs (5ms)
├─ /api/search.json (237ms)
├─ /api/_content/cache.1709570464844.json (1287ms)
├─ /blog (1329ms)
├─ /plans (1336ms)
├─ / (1345ms)
├─ /api/_content/query/wxmlyJ2dlX.1709570464844.json (4ms)
├─ /blog/_payload.json (3ms)
├─ /api/_content/query/XNGhUmRqpy.1709570464844.json (2ms)
├─ /plans/_payload.json (2ms)
├─ /api/_content/query/brX4CwCJoQ.1709570464844.json (1ms)
├─ /_payload.json (1ms)
├─ /api/_content/navigation/u7BbTyuhiE.1709570464844.json (30ms)
├─ /api/_content/query/kx230PV8cu.1709570464844.json (30ms)
├─ /blog/__og_image__/og.png (890ms)
├─ /plans/__og_image__/og.png (889ms)
Prerendered 16 routes in 8.44 seconds
nuxt.config.ts
routeRules: {
'/': { prerender: true },
'/plans': { prerender: true },
'/docs': { prerender: true, redirect: '/docs/getting-started' },
// '/docs/*': { prerender: true },
'/blog': { prerender: true },
// '/blog/*': { prerender: true },
'/api/search.json': { prerender: true },
'/about': { prerender: true },
'/earn': { prerender: true },
'/[id]': { prerender: false, ssr: true, cache: { maxAge: 60 } },
},
I'm testing the https://github.com/nuxt-ui-pro/saas/blob/main/nuxt.config.ts
from nuxt.
this solved my issue
🤦
lost ~10 hours...
PS: actually this made me run into more issues :))
SOLUTION: DELETE ALL REWRITES AND REDIRECTS
I found it here - aws-amplify/amplify-hosting#3829
Update 2:
none of the solutions working for my case :( todo: cry hard and test vercel/netlify
from nuxt.
Related Issues (20)
- Tailwindcss added at last is not applied HOT 5
- Disabling SSR prevents remaining CSS from loading HOT 5
- Error: Cannot find module punycode/ HOT 9
- Img @error not working HOT 2
- useHead undefined after initiating a regex (since monday) HOT 4
- keepalive not work HOT 1
- String vs object errors with `createError` and accessing server-thrown errors on client
- Tailwind css issue related to CSS specificity on dev server HOT 1
- keep alive caches are destroyed when visit keep alive excluded page HOT 2
- The package generated under the .output/server/node_modules file is a hyperlink. HOT 2
- 'text/html' is not a valid JavaScript MIME type. HOT 2
- This module cannot be imported in the Vue part of your app. [importing @nuxt/kit from app.vue] causing page to not work HOT 5
- If a component uses empty data in `useFetch`, then `clearError` will be invalidated HOT 2
- Cache control header missing in response headers (while using nitro.publicAssets) HOT 7
- [nuxt] [request error] [unhandled] [500] _fetch is not a function HOT 3
- feat: support passing options to `TypedRouterOptions` when using `experimental.typedPages` HOT 3
- Dynamic layouts HOT 4
- Previous route info HOT 2
- Imported CSS files not correctly injected in circumstances involving lazy-loaded components HOT 1
- Nuxt 3 Dev build time is very slow in WSL 2 Linux Ubuntu ~ ranging up to 30 seconds just to refresh changes HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuxt.