2 years ago
I tried several ways, but I'm more and more confused. There are ways to do this with Vercel, Netfly, but not with Astro and I haven't found any solution yet…
21 Replies
2 years ago
build logs please
2 years ago
Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up to date with package.json2 years ago
delete your local lock file, run pnpm install, push the changes
2 years ago
build logs please
2 years ago
your build has a lot of warnings, please fix them
[Region: us-west1]
=========================
Using Detected Dockerfile
=========================
context: 4a8935b17b2aeac58fc2d8cdcf8c4c4c
0 building with "default" instance using docker driver
1 [internal] load build definition from Dockerfile
1 transferring dockerfile: 213B done
1 DONE 0.0s
2 [internal] load metadata for docker.io/library/caddy:alphine
2 ERROR: docker.io/library/caddy:alphine: not found
[internal] load metadata for docker.io/library/caddy:alphine:
Dockerfile:1
1 | >>> FROM caddy:alphine
2 |
3 | RUN apk update && apk add --no-cache nodejs pnpm
ERROR: failed to solve: caddy:alphine: docker.io/library/caddy:alphine: not found
I tried to make a new project in Astro and now it also gives errors but shows fewer errors
2 years ago
please use the bookmarklet
2 years ago
document is not defined
Hint: Browser APIs are not available on the server.
If the code is in a framework component, try to access these objects after rendering using lifecycle methods or use a `client:only` directive to make the component exclusively run on the client.
See https://docs.astro.build/en/guides/troubleshooting/#document-or-window-is-not-defined for more information.Yep that can happen if you unintentionally import a module that uses browser api to a server component. Try to keep them as separate modules or at least ensure that a function that accesses document or window object is not called on server side (you can use typeof window !== 'undefined' to check for it)
I end up not understanding how this works…
Is there an example repository I can look at that is configured for railway up?
2 years ago
your issue isn't with Railway, your issue is with your code, an example alone isn't going to do too much good to help you learn how to build an astro site