Zack Plauché
Zack Plauché
Explore posts from servers
NNuxt
Created by Zack Plauché on 8/23/2024 in #❓・help
Might be a Tailwind question, but... somehow my Google Fonts are working without adding any <link>s
I have the @nuxtjs/tailwindcss plugin on my nuxt 3 project. I normally add fonts via Google Fonts by getting the links and installing them. I have tailwind typography added as well. However, I don't see anything in the Tailwind docs saying that the fonts are included. I also don't see any Google fonts in the links / script tags. How could this be? Works in both Chromium and Firefox
2 replies
NNuxt
Created by Zack Plauché on 8/1/2024 in #❓・help
Init new Nuxt project without "Initialize git repository" check?
Is there a way to do this? I have my new project command so far as:
npx nuxi init frontend --packageManager yarn
npx nuxi init frontend --packageManager yarn
And that does almost everything I need to create a new project. I NEVER initialize a git repo in my frontend folder (typically monorepos with separate backend). Isn't there some flag to make this not a thing? Personally I think it should be initialized without it anyways.
3 replies
NNuxt
Created by Zack Plauché on 7/12/2024 in #❓・help
How to access useLocalStorage in Nuxt 3?
I know some Vue Use things come built-in like useHead and what not. But does it also come with useLocalStorage? If not, how to add it?
9 replies
NNuxt
Created by Zack Plauché on 6/28/2024 in #❓・help
NuxtLink download="false" error
On render :download="false" actually becomes download="false"
<template>
<NuxtLink :to="linkMap[linkField.linktype]" :target="linkField.target" :download="linkField.linktype === 'asset'">
<slot />
</NuxtLink>
</template>

<script setup>
const { linkField } = defineProps({ linkField: Object })

const linkMap = {
url: linkField.url,
asset: linkField.url,
email: `mailto:${linkField.email}`,
story: linkField.story?.url,
}
</script>
<template>
<NuxtLink :to="linkMap[linkField.linktype]" :target="linkField.target" :download="linkField.linktype === 'asset'">
<slot />
</NuxtLink>
</template>

<script setup>
const { linkField } = defineProps({ linkField: Object })

const linkMap = {
url: linkField.url,
asset: linkField.url,
email: `mailto:${linkField.email}`,
story: linkField.story?.url,
}
</script>
5 replies
NNuxt
Created by Zack Plauché on 6/15/2024 in #❓・help
Nuxt DevTools: RPC error on executing "installNuxtModule"
No description
2 replies
NNuxt
Created by Zack Plauché on 4/25/2024 in #❓・help
useCookie typescript saying that Boolean should be a string, when it's a boolean
I have code that does:
const login() => {
const isLoggedIn = useCookie('isLoggedIn')
isLoggedIn.value = 'true'
}

definePageMeta({
middleware: () => {
const isLoggedIn = useCookie('isLoggedIn')
if (isLoggedIn.value === 'true') {
navigateTo('/page/')
}
}
})
const login() => {
const isLoggedIn = useCookie('isLoggedIn')
isLoggedIn.value = 'true'
}

definePageMeta({
middleware: () => {
const isLoggedIn = useCookie('isLoggedIn')
if (isLoggedIn.value === 'true') {
navigateTo('/page/')
}
}
})
Problem is, isLoggedIn.value actually returns a Boolean, not a string like TypeScript thinks 🙂 So looks like something might be wrong with the docs for this 👀 How to fix it? Literally this works:
if (isLoggedIn.value === true) {...}
if (isLoggedIn.value === true) {...}
But typescript says it's wrong.
2 replies
NNuxt
Created by Zack Plauché on 4/25/2024 in #❓・help
Public Images breaking on Hot Reload (latest nuxt version, literally today's project)
Created a project and have 2 image tags pointing to public. Everytime I make a change and save (hot reload) it breaks and it makes the little image not found icon. Nothing crazy.
<img src="/my-image.png">
<img src="/my-image.png">
Is there a known solution to this issue?
2 replies
RRailway
Created by Zack Plauché on 2/5/2024 in #✋|help
Every single time you guys try to charge my card automatically it says it was unsuccessful...
I have to go to the website and make the payment directly otherwise you shut down my service. I don't want to think about if my website is up and running! Please fix your autorenewal charging function!
6 replies
RRailway
Created by Zack Plauché on 11/28/2023 in #✋|help
Long Request Railway Timeout Errors
No description
32 replies
RRailway
Created by Zack Plauché on 10/19/2023 in #✋|help
How should Root Directory be set?
For example, if my folder structure was:
myproject/ <-- Acutal root dir
backend/ <-- The one I want to be root dir
frontend/
myproject/ <-- Acutal root dir
backend/ <-- The one I want to be root dir
frontend/
should my Root Directory be backend, backend/, /backend or /backend/?
11 replies
NNuxt
Created by Zack Plauché on 1/10/2023 in #❓・help
`window is not defined` and `document is not defined`
I'm getting window is not defined, and document is not defined. I'm using one in a composable and another in a view. I understand it has to do with server vs client side, and it's only an issue when my server reloads after I add it on the page. Otherwise it works. How do I make my composable / component "client side"?
3 replies
NNuxt
Created by Zack Plauché on 12/18/2022 in #❓・help
Are you supposed to use useFetch for other requests than GET?
Literally just that. Can you send POST requests with useFetch? and if so, how?
2 replies
NNuxt
Created by Zack Plauché on 11/18/2022 in #❓・help
Is the Script tag from useHead not a thing anymore?
No description
7 replies
RRailway
Created by Zack Plauché on 11/5/2022 in #✋|help
How to sleep a Web Server or Database?
Just migrated from Heroku. I'm wanting to see how to not use accounts resources more than I need to on unimportant projects. Is there a way to somehow "sleep" a project and it's database to make it's projected cost zero? Or do I just have to delete it completely?
4 replies