RafidMuhymin / astro-spa

An Astro JS component that turns a website into an SPA and boost performance using various techniques
MIT License
391 stars 14 forks source link

500 internal server error #1

Closed calvary-tucson closed 2 years ago

calvary-tucson commented 2 years ago

On a clean install of Astro using the Minimal as the base, I get a 500 internal server error when I add

import { Spa } from "astro-spa";

To index.astro

Log on the page:

D:/Development/calvarytucson-web-astro/node_modules/astro-spa/Spa.astro: Expected "}" but found "{"

Error: Transform failed with 1 error: D:/Development/calvarytucson-web-astro/node_modules/astro-spa/Spa.astro:158:148: error: Expected "}" but found "{" at failureErrorWithLog (D:\Development\calvarytucson-web-astro\node_modules\astro\node_modules\esbuild\lib\main.js:1493:15) at D:\Development\calvarytucson-web-astro\node_modules\astro\node_modules\esbuild\lib\main.js:1282:29 at D:\Development\calvarytucson-web-astro\node_modules\astro\node_modules\esbuild\lib\main.js:629:9 at handleIncomingPacket (D:\Development\calvarytucson-web-astro\node_modules\astro\node_modules\esbuild\lib\main.js:726:9) at Socket.readFromStdout (D:\Development\calvarytucson-web-astro\node_modules\astro\node_modules\esbuild\lib\main.js:596:7) at Socket.emit (node:events:390:28) at addChunk (node:internal/streams/readable:315:12) at readableAddChunk (node:internal/streams/readable:289:9) at Socket.Readable.push (node:internal/streams/readable:228:10) at Pipe.onStreamRead (node:internal/stream_base_commons:199:23)

package.json file:

{
  "name": "@example/minimal",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "dev": "astro dev",
    "start": "astro dev",
    "build": "astro build",
    "preview": "astro preview"
  },
  "devDependencies": {
    "astro": "^0.21.4"
  },
  "dependencies": {
    "astro-spa": "^1.3.0"
  }
}
calvary-tucson commented 2 years ago

I believe this issue is caused by something in astro version 0..21

zanhk commented 2 years ago

Same

RafidMuhymin commented 2 years ago

Astro SPA v1.3.2 has been released! This release fixes the issues introduced by the new compiler and VIte integration. Thanks for your patience.