Closed natestemen closed 1 year ago
cc @nathanshammah
Tried further to get this up and running tonight, but I'm stuck. Here's what I did
npm i
in root of repo successfully installs dependenciesnpm start
fails with
[config] Astro found issue(s) with your configuration:
! experimental Invalid experimental key: `redirects`.
Make sure the spelling is correct, and that your Astro version supports this experiment.
See https://docs.astro.build/en/reference/configuration-reference/#experimental-flags for more information..
npm start
then appears to work, but when visiting http://127.0.0.1:3000/, the site crashes with the following error regarding the cloudName
variable. This, or a same error occur with all of the scripts in package.json
.
error "You must supply a cloudName when initializing the asset"
Hint:
To get as much information as possible from your errors, make sure to throw Error objects instead of `string`. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error for more information.
File:
/Users/nate/code/unitary.fund/node_modules/astro/dist/core/errors/utils.js:64:19
Code:
63 | } else {
> 64 | const error = new Error(JSON.stringify(err));
| ^
65 | error.hint = `To get as much information as possible from your errors, make sure to throw Error objects instead of \`${typeof err}\`. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error for more information.`;
66 | return error;
67 | }
I also noticed while playing around with stuff here that typescript is not included in the package.json
file, so I had to manually install that in order to check types. As stated previously, I'm not experienced in this area, so I may be doing something wrong. But when I ran npx tsc --build
I did encounter quite a few errors. Is this expected?
Hi both, thanks for your patience on this one. I've added content to the wiki and will be migrating existing docs and writing some further docs there also, here's the relevant page: https://github.com/unitaryfund/unitary.fund/wiki/Getting-Started
The main things to note re steps you took @natestemen are:
"devDependencies"
. Beyond that, Astro handles everything, so using tsc
directly will likely behave strangely, notwithstanding skipping Astros dedicated build process. If you want to build locally you can use pnpm build
(or which triggers astro build
) but locally best to generally stick to pnpm dev
as per the wiki unless you're wanting to test build.
I might be missing these somewhere, but I have not found any developer docs on spinning up the site locally (what commands do I need to run locally to install all the things, get it running, rebuild, etc). As a little bit of context, I am familiar with
npm
, but notastro
.cc @joshdavenport, @WrathfulSpatula