A static site building framework giving high speed performance and a modernized development flow. Astro converts your website source code to static HTML during the building process, resulting in an almost fully static website with minimal JavaScript leftover. This results in maximized speed for loading content from the web browser.
Questions tagged [astrojs]
196 questions
0
votes
1 answer
Why do my Astro builds fail when featuredImage is null?
I'm using WPGraphQL to query all of my posts from WordPress. And I'm using Astro to display a list of cards for each of those posts on the front-end.
Here is what that my GraphQL query looks like:
/* BASIC FETCH API */
async function…
0
votes
1 answer
Astro JS problem with React component in production
I'm having some issues with Astro/React and rendering a component in production. I'm using react-youtube in a tsx component and then turning it into an .astro component before using that to render a youtube link as a native…

viktorfromearth
- 1
- 2
0
votes
1 answer
How to iterate over svelte writable store with svelte each?
i have started to use astro and svelte. Currently i am trying to fetch some data and store it in a writable store in a JS file. In my svelte component i am using {#await} and within {:then} a {#each}.
The problem is that i get the following error…

AndiGo
- 1
- 1
- 2
0
votes
1 answer
Have I lost my mind or are these functional components using invalid hook calls?
I have been banging my head against the desk since last night trying to figure out what is causing this warning in my AstroJS project. I am currently building an AstroJS project with React components and without making any significant changes my…

Austin S
- 145
- 1
- 10
0
votes
2 answers
How to import my external Style or JS files in Astro Layout
Does anyone know how I'll be able to import my external CSS and JS files into Astro's new version? I tried:
But it's not workings anymore after Astro's new 1.0 Update launch.

SukhOP
- 1
- 1
- 2
0
votes
0 answers
Astro: Exclude dependency internal import from turning into an API route
In an Astro app, I am consuming an (in-house) React component library where the components import their own styling which is expressed in files such as Foo.css.map (for the Foo component).
As I am using api routes, I have files such as…

Jonathan.Brink
- 23,757
- 20
- 73
- 115
0
votes
2 answers
Build one css file in astro framework
In Astro.js after the build I get 3 separate CSS files:
But what…

LityS
- 3
- 2
0
votes
1 answer
How to enable emmet in .astro?
https://github.com/withastro/language-tools/tree/main/packages/language-server
I have installed the language server above in neovim.
The language server comes with emmet support, but I can't seem to get it to work.
How can I enable emmet in .astro…

cusX
- 470
- 1
- 6
- 17
0
votes
2 answers
Prismic asHtml() escapes HTML for rich text field in Astro
I am attempting to use Astro for the first time, and I am also attempting to use Prismic as the data source. In my Prismic project, I have a number of rich text fields, and I simply want to render them as HTML in my Astro component. Per the Prismic…

wonder95
- 3,825
- 8
- 45
- 74
0
votes
0 answers
Using Vaadin with Astro
I tried to use vaadin component in Astro powered app. Unfortunately I get this error;
Named export 'dedupingMixin' not found. The requested module '@polymer/polymer/lib/utils/mixin.js' is a CommonJS module, which may not support all module.exports…

Jinx
- 348
- 3
- 14
0
votes
1 answer
Is there a way to show p5 canvas in on an astro site?
I am trying to get a p5 canvas to work on an astro-generated site. And I am trying to do that by importing a jsx react component. Here is my astro page
import SketchWrapper from '../components/sketchWrapper.jsx';
import sketch from…

VoNagisa
- 1
0
votes
0 answers
Cannot delete files/directories
I just started a blog template project with Astro.
https://astro.build/
My project folder is C:/web/astro-test-1/ and i want to deploy my build to a local server at C:/wamp64/www/astro/ with npm run build.
I´d setup the astro.config.mjs as…

RustyJames
- 123
- 7
-1
votes
1 answer
AstroJS: Confused by how script bundling works
I have created a simple Astro project, that has now two pages:
index.astro
dashboard.astro
If I put a console log in the dashboard.astro and load the index page, the script get executed.
How exactly does it work?
Thanks

mijorus
- 111
- 1
- 7
-1
votes
1 answer
Astro js site inside docker can not be reached from chrome
I'm trying to develop astro.js inside docker.
Here's my docker-compose.yml file:
version: "3.9"
services:
site:
image: node:lts-bullseye-slim
ports:
- 3000:3000
volumes:
- /project:/project
…

Big boy
- 1,113
- 2
- 8
- 23
-3
votes
0 answers
Astro application won't write to the console
I am trying to use a simple form in a TypeScript-based Astro application. I want to grab what is entered into the input box and put it in the console. I have a working application here.
But when I enter data and press the button, I see nothing in…

Nick Hodges
- 16,902
- 11
- 68
- 130