xcatliu / pagic

A static site generator powered by Deno + React
https://pagic.org
MIT License
1.64k stars 104 forks source link

Getting started instructions doesn't work #111

Open tiborsaas opened 1 year ago

tiborsaas commented 1 year ago

Describe the bug

I followed the instructions on the homepage and I got this error:

λ pagic build --watch --serve
error: Uncaught TypeError: Cannot read properties of undefined (reading 'exclude')
      ...(this.projectConfig.exclude ?? []),
                             ^
    at Pagic.initConfig (https://deno.land/x/pagic@v1.6.2/src/Pagic.ts:273:30)
    at eventLoopTick (ext:core/01_core.js:181:11)
    at async Pagic.rebuild (https://deno.land/x/pagic@v1.6.2/src/Pagic.ts:251:5)
    at async Pagic.build (https://deno.land/x/pagic@v1.6.2/src/Pagic.ts:213:5)

To Reproduce

I'm on Windows 10;

deno 1.33.3 (release, x86_64-pc-windows-msvc)
v8 11.4.183.2
typescript 5.0.4
xcatliu commented 1 year ago

Hi @tiborsaas , thanks for your issue, it seems like a config file is not provided, so this.projectConfig comes with undefined.

Please double check the pagic.config.tsx, if this error still throws, please provide a git repo which can reproduce this bug