Neamix
Neamix
Explore posts from servers
NNuxt
Created by Neamix on 10/19/2024 in #❓・help
Cant access pinia from component
I am trying to access my store from component but i am getting that error
[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"? See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help. This will fail in production.
[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"? See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help. This will fail in production.
if i called my store from page it work but if i called it from store it not here is my component code
<template>
<div class="dropdown w-full m-auto rounded-[16px] overflow-hidden register-card absolute bg-white left-0 top-14 border border-gray-200 ">
<slot name="items"></slot>
</div>
</template>

<script>
// import { useRegisterStore } from '@/stores/register';

let registerStore = useRegisterStore();
</script>
<template>
<div class="dropdown w-full m-auto rounded-[16px] overflow-hidden register-card absolute bg-white left-0 top-14 border border-gray-200 ">
<slot name="items"></slot>
</div>
</template>

<script>
// import { useRegisterStore } from '@/stores/register';

let registerStore = useRegisterStore();
</script>
2 replies
NNuxt
Created by Neamix on 8/31/2024 in #❓・help
Firebase 503
I am trying to send otp via nuxt using firebase but i am getting this error on using non test phone number
{
"error": {
"code": 503,
"message": "Error code: 39",
"errors": [
{
"message": "Error code: 39",
"domain": "global",
"reason": "backendError"
}
]
}
}
{
"error": {
"code": 503,
"message": "Error code: 39",
"errors": [
{
"message": "Error code: 39",
"domain": "global",
"reason": "backendError"
}
]
}
}
i tried to upgrade to billing plan but still not wokring
4 replies
NNuxt
Created by Neamix on 8/31/2024 in #❓・help
Nitro server work only on local
I my routes in nuxt nitro server and it was fine on localhost but after deploy this routes return 404 to me here is an example to one of my server routes
export default defineEventHandler(async (event) => {
const body = await readBody(event);
let route = body.domain+'/api/user/phone/count';
console.log(route);
return await $fetch(route, {
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
method: 'post',
body: {
phone: body.phone,
countryCode: body.countryCode
}
})
})
export default defineEventHandler(async (event) => {
const body = await readBody(event);
let route = body.domain+'/api/user/phone/count';
console.log(route);
return await $fetch(route, {
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
method: 'post',
body: {
phone: body.phone,
countryCode: body.countryCode
}
})
})
2 replies
NNuxt
Created by Neamix on 8/4/2024 in #❓・help
Nitro return 404 on server
Hi, i have an API route that i called inside nitro and it worked locally but on the server it doesn't work
2 replies
NNuxt
Created by Neamix on 6/30/2024 in #❓・help
Get api domain in nitro server file
Greeting i created server route that go to api and check the phone if it exist before or not here it's
export default defineEventHandler(async (event) => {
let config = useRuntimeConfig();
let domain = config.public.apiURL;
let route = domain+'/api/user/phone/count';
const body = await readBody(event);
return await $fetch(route, {
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
method: 'post',
body: {
phone: body.phone,
countryCode: body.countryCode
}
})
})
export default defineEventHandler(async (event) => {
let config = useRuntimeConfig();
let domain = config.public.apiURL;
let route = domain+'/api/user/phone/count';
const body = await readBody(event);
return await $fetch(route, {
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
method: 'post',
body: {
phone: body.phone,
countryCode: body.countryCode
}
})
})
and here it my env file
apiURL=https://app.rifq.me
apiURL=https://app.rifq.me
every thing is cool on local but on production i got File not found error (Note: api route is same on local and prod)
3 replies
NNuxt
Created by Neamix on 6/17/2024 in #❓・help
Create .env file
How can i create .env file i read the docs and according to it .env should be exist in nuxt installation but i cant find it and i tried to use this command
npx nuxi dev --dotenv .env.local

npx nuxi dev --dotenv .env.local

and it open dev server not create a new .env file
5 replies
NNuxt
Created by Neamix on 6/3/2024 in #❓・help
Deploy Nuxt 3 app with forge
How can i deploy nuxt 3 app using forge i tried to find any tutorial but i didnt find any
1 replies
NNuxt
Created by Neamix on 5/30/2024 in #❓・help
Nuxt server api get validation error
Hello, i am using Laravel as a backend and Nuxt 3 as front and i am sending requests from front to back using server api so how can i catch validation error that Laravel send it back i tried to catch it but Nuxt return to me the error not the missing validations
1 replies
NNuxt
Created by Neamix on 5/28/2024 in #❓・help
Send otp from firebase
Hello, I want to send OTPs from a Nuxt 3 app using Firebase. I tried to find plugins or documentation to help integrate Firebase Phone Authentication, but I couldn't find any. If anyone can share a method with me, I would be thankful.
1 replies
NNuxt
Created by Neamix on 5/18/2024 in #❓・help
Error page ui doesnt changed
Hello, So i tried to change the ui of the error page by adding error.vue in the root but the ui did not change
2 replies