Ryan The Temp
Ryan The Temp
Explore posts from servers
NNuxt
Created by Ryan The Temp on 9/23/2024 in #❓・help
Which of these is the correct way to fetch?
When is the correct way to do a $fetch with parameters: A: data is: globalThis.Ref<unknown, unknown>
const { data } = await useAsyncData("project", () =>
$fetch(`/api/project/${id}`,
)
const { data } = await useAsyncData("project", () =>
$fetch(`/api/project/${id}`,
)
B: data is: globalThis.Ref<Simplify<SerializeObject<{..... /> (correct)
const { data } = await useAsyncData("project", () =>
$fetch(`/api/project/:id`, { params: { id } }),
)
const { data } = await useAsyncData("project", () =>
$fetch(`/api/project/:id`, { params: { id } }),
)
A works if I just cast everything to any, but I lose all types. B also works, but it looks weird that I have to have an :id and declare a params 😕
3 replies
NNuxt
Created by Ryan The Temp on 9/7/2024 in #❓・help
Type errors being thrown from `nuxt-content`
I'm not sure if this is nuxt-content related or not. It could be nuxt and/or vue, since both got a version bump. during nuxi typecheck I get these errors:
node_modules/@nuxtjs/mdc/dist/runtime/components/prose/ProseH6.vue:4:13 - error TS2339: Property 'id' does not exist on type 'CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, { generate: typeof generate; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 17 more ..., {}>'.

4 v-if="id && generate"
node_modules/@nuxtjs/mdc/dist/runtime/components/prose/ProseH6.vue:4:13 - error TS2339: Property 'id' does not exist on type 'CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, { generate: typeof generate; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 17 more ..., {}>'.

4 v-if="id && generate"
Looking at the source code for that file here: https://github.com/nuxt-modules/mdc/blob/main/src/runtime/components/prose/ProseH6.vue its pertty straight foward. I'm thinking is prop access like that not supported anymore?
1 replies
RRailway
Created by Ryan The Temp on 7/7/2024 in #✋|help
Why are two active deployments shown?
I know there were some UI updates this past week, but now I see two active deployments everytime I do a deploy. Why is that?
13 replies
NNuxt
Created by Ryan The Temp on 7/3/2024 in #❓・help
`readBody` hangs
Hi, I have this code:
export default defineEventHandler(async (event) => {
const body = await readBody(event)

console.log("body: ", body)
return true
})
export default defineEventHandler(async (event) => {
const body = await readBody(event)

console.log("body: ", body)
return true
})
Is there any reason why code execution would hang at the readBody line indefinitely?
3 replies
RRailway
Created by Ryan The Temp on 6/27/2024 in #✋|help
Build hangs with Context: ...
Hi, I'm not sure why, but a few times build just hangs with the only output being:
[Region: us-west1]
==============
Using Nixpacks
==============
context: e7b2f688af0ffebee4e27a48e1bbdedd
[Region: us-west1]
==============
Using Nixpacks
==============
context: e7b2f688af0ffebee4e27a48e1bbdedd
22 replies
NNuxt
Created by Ryan The Temp on 6/9/2024 in #❓・help
How to properly run local dev server using ssl
I configured my local dev server to use https like so:
devServer: {
host: 'app.local',
https: {
cert: './.certs/app.local.pem',
key: './.certs/app.local-key.pem',
},
},
devServer: {
host: 'app.local',
https: {
cert: './.certs/app.local.pem',
key: './.certs/app.local-key.pem',
},
},
Im now able to access my app locally using: https://app.local However, on the server, why does this return http?
export default defineEventHandler((event) => {
const redirectUrl = getRequestURL(event)

console.log('protocol', redirectUrl.protocol) // <-- 'http'
return
})
export default defineEventHandler((event) => {
const redirectUrl = getRequestURL(event)

console.log('protocol', redirectUrl.protocol) // <-- 'http'
return
})
Am I missing something?
1 replies
NNuxt
Created by Ryan The Temp on 5/23/2024 in #❓・help
How do you set the cookie domain?
I've setup a hosts entry for local development for app.local Now I'm running nuxt with nuxt dev --host app.local The problem is that when I use setCookie from h3 its still creating the cookie for the localhost domain. Is there a way to change this?
3 replies
NNuxt
Created by Ryan The Temp on 5/18/2024 in #❓・help
Build hangs after success
When Run nuxt build it seems to hang after it finishes. The last output is: #13 158.8 [success] [nitro] You can preview this build using node .output/server/index.mjs If I manually kill the process with CMD+C and run nuxt preview i'm able to run the built app. The problem is that in the CI environment, it would just hang forever and eventually timeout. Any idea what is the problem? Can turn on verbose logging to see what exactly is hanging on?
1 replies
RRailway
Created by Ryan The Temp on 2/2/2024 in #✋|help
How do you properly set the node version that you want?
No description
43 replies
RRailway
Created by Ryan The Temp on 10/7/2023 in #✋|help
Google oauth redirect_uri_mismatch
Is there way to get google oauth to work? I'm running into weird issues related to the callback during the redirect. If I understand, railway proxies things in a special way, which causes the issue. I read in another post that changing the url to http rather than https solves the problem, but that isn't a good workaround because google requires clients that are in production to be https.
18 replies
RRailway
Created by Ryan The Temp on 10/6/2023 in #✋|help
Database becomes constantly unreachable or times out due to pg adivisory lock
I'm using prisma, and before starting the application, I run the prisma migrations. It periodically crashes when I do a new deploy. The workaround seems to be redeploy the database service. Am I doing something wrong here?
4 replies
RRailway
Created by Ryan The Temp on 8/13/2023 in #✋|help
Application failed to respond for a few seconds after deploy
I have this recurring issue where every time I do a deploy, its successful, but when I check the domain, I get a Application failed to respond message from Railway. I keep refreshing a couple of times, and then it finally loads the newly deployed app. It's as if the deployment is published before it is ready, even though the logs indicate that the server is listening Any idea what is going on? I tried playing with the health check settings, but it didn't help.
22 replies
NNuxt
Created by Ryan The Temp on 7/9/2023 in #❓・help
Build timeout during prerender step
No description
1 replies
RRailway
Created by Ryan The Temp on 6/10/2023 in #✋|help
Is there a way to pass an extra flag to the `install` command?
Is there a way in Nixpacks to pass an extra flag? For example, I would like to skip the postInstall when running pnpm install and add the --ignore-scripts flag. Is there a way to do that in railway.toml?
23 replies
RRailway
Created by Ryan The Temp on 6/1/2023 in #✋|help
Is there a way to specify pnpm version?
17 replies
NNuxt
Created by Ryan The Temp on 4/16/2023 in #❓・help
Is there a way to set a custom response header?
No description
2 replies
RRailway
Created by Ryan The Temp on 3/30/2023 in #✋|help
Hey, how can I specify a pnpm version to use?
I tried setting this in package.json:
"engines": {
"pnpm": "8.x"
},
"engines": {
"pnpm": "8.x"
},
But it still seems to use pnpm-7_x
14 replies
RRailway
Created by Ryan The Temp on 3/13/2023 in #✋|help
TOS for video conversion
Hi, is it against TOS to create a service that takes a video input, and converts it? (It uses FFMPEG behind the scenes)
6 replies