SharpieMaster
SharpieMaster
Explore posts from servers
NNuxt
Created by SharpieMaster on 8/14/2024 in #❓・help
No intellisense VSCode
My intellisense for types and javascript dissapear randomly, and I get a notification "To enable project-wide JavaScript/TypeScript language features, exclude large folders with source files that you do not work on.",but shouldnt the tsconfig already be doing that? I also run out of memory often, is this normal?
ERROR [uncaughtException] Worker terminated due to reaching memory limit: JS heap out of memory 6:33:18 p.m.

at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
at new NodeError (node:internal/errors:405:5)
at [kOnExit] (node:internal/worker:313:26)
at Worker.<computed>.onexit (node:internal/worker:229:20)
ERROR [uncaughtException] Worker terminated due to reaching memory limit: JS heap out of memory 6:33:18 p.m.

at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
at new NodeError (node:internal/errors:405:5)
at [kOnExit] (node:internal/worker:313:26)
at Worker.<computed>.onexit (node:internal/worker:229:20)
I have 32 Gb of memory, and this is my nuxi info
- Operating System: Windows_NT
- Node Version: v20.5.0
- Nuxt Version: 3.12.4
- CLI Version: 3.12.0
- Nitro Version: 2.9.7
- Package Manager: [email protected]
- Builder: -
- User Config: compatibilityDate, typescript, devtools, alias, modules
- Runtime Modules: [email protected], @nuxtjs/[email protected]
- Build Modules: -
------------------------------
- Operating System: Windows_NT
- Node Version: v20.5.0
- Nuxt Version: 3.12.4
- CLI Version: 3.12.0
- Nitro Version: 2.9.7
- Package Manager: [email protected]
- Builder: -
- User Config: compatibilityDate, typescript, devtools, alias, modules
- Runtime Modules: [email protected], @nuxtjs/[email protected]
- Build Modules: -
------------------------------
Thank you.
6 replies
NNuxt
Created by SharpieMaster on 8/13/2024 in #❓・help
No Type Hints
I was under the impression that Nuxt supported types everywhere. But in this simple ./app.vue
<script setup lang="ts">
const count = ref<number>(0);
const increment = () => count.value++;
</script>

<template>
<div>
<span>count is {{ count }}</span>
<button v-on:click="increment()">+</button>
</div>
</template>
<script setup lang="ts">
const count = ref<number>(0);
const increment = () => count.value++;
</script>

<template>
<div>
<span>count is {{ count }}</span>
<button v-on:click="increment()">+</button>
</div>
</template>
I dont get any type hints for the count variable, nor the increment function within the code block, and I do not get any errors when writing invalid typescript code before execution. I have the Vue - Official vs code extension installed.
------------------------------
- Operating System: Windows_NT
- Node Version: v20.5.0
- Nuxt Version: 3.12.4
- CLI Version: 3.12.0
- Nitro Version: 2.9.7
- Package Manager: npm@9.8.0
- Builder: -
- User Config: compatibilityDate, typescript, devtools, modules
- Runtime Modules: nuxt-typed-router@3.6.5
- Build Modules: -
------------------------------
------------------------------
- Operating System: Windows_NT
- Node Version: v20.5.0
- Nuxt Version: 3.12.4
- CLI Version: 3.12.0
- Nitro Version: 2.9.7
- Package Manager: npm@9.8.0
- Builder: -
- User Config: compatibilityDate, typescript, devtools, modules
- Runtime Modules: nuxt-typed-router@3.6.5
- Build Modules: -
------------------------------
If this is expected behavior, please tell me. Thank you.
13 replies
DHDistant Horizons
Created by SharpieMaster on 7/24/2024 in #help-me
Strange black leaves and missing chunks
No description
16 replies
TTCTheo's Typesafe Cult
Created by SharpieMaster on 7/20/2024 in #questions
RRule datetime generation randomly wrong
I am making a project using google calendar. I am using the rrule library to generate dates for event times.
import { z } from "zod";
import { calendar_v3, google } from "googleapis";
import { DateTime } from "luxon";

//...

const rrule = RRule.fromString(event.recurrence[0].split(":")[1]!);
if (!event.start?.dateTime) return null;

const startDateTime = DateTime.fromISO(event.start.dateTime).setZone(
"UTC",
);

rrule.options.dtstart = startDateTime.toJSDate();
rrule.options.tzid = "UTC";
const utcStartTime = startDateTime.toJSDate();

rrule.options.bysecond = [utcStartTime.getUTCSeconds()]; // Never mentioned in the docs, works for some reason
rrule.options.byminute = [utcStartTime.getUTCMinutes()];
rrule.options.byhour = [utcStartTime.getUTCHours()];

const dates = rrule.all((d, i) => {
return i < 20;
});

console.log(dates.map((d) => d.toLocaleString("en-US"))); // log 1

const meetingModifications: calendar_v3.Schema$Event[] = [];
for (const date of dates) {
const eventModificationId = `${meetingLinkCheck.googleCalendarEventId}_${DateTime.fromJSDate(
date,
)
.setZone("UTC")
.toISO()
?.replaceAll("-", "")
.replaceAll(":", "")
.replaceAll(".", "")
.replace("000Z", "Z")}`;
try {
const eventModification = (
await calendar.events.get({
calendarId: "primary",
eventId: eventModificationId,
})
).data;
if (!eventModification) continue;
meetingModifications.push(eventModification);
} catch (error) {
console.log(eventModificationId, date.toLocaleString("en-US")); // log 2
continue;
}
}

meetingModifications.sort((a, b) => {
const dateTimeA = a.start?.dateTime ?? "";
const dateTimeB = b.start?.dateTime ?? "";
return dateTimeA.localeCompare(dateTimeB);
});
import { z } from "zod";
import { calendar_v3, google } from "googleapis";
import { DateTime } from "luxon";

//...

const rrule = RRule.fromString(event.recurrence[0].split(":")[1]!);
if (!event.start?.dateTime) return null;

const startDateTime = DateTime.fromISO(event.start.dateTime).setZone(
"UTC",
);

rrule.options.dtstart = startDateTime.toJSDate();
rrule.options.tzid = "UTC";
const utcStartTime = startDateTime.toJSDate();

rrule.options.bysecond = [utcStartTime.getUTCSeconds()]; // Never mentioned in the docs, works for some reason
rrule.options.byminute = [utcStartTime.getUTCMinutes()];
rrule.options.byhour = [utcStartTime.getUTCHours()];

const dates = rrule.all((d, i) => {
return i < 20;
});

console.log(dates.map((d) => d.toLocaleString("en-US"))); // log 1

const meetingModifications: calendar_v3.Schema$Event[] = [];
for (const date of dates) {
const eventModificationId = `${meetingLinkCheck.googleCalendarEventId}_${DateTime.fromJSDate(
date,
)
.setZone("UTC")
.toISO()
?.replaceAll("-", "")
.replaceAll(":", "")
.replaceAll(".", "")
.replace("000Z", "Z")}`;
try {
const eventModification = (
await calendar.events.get({
calendarId: "primary",
eventId: eventModificationId,
})
).data;
if (!eventModification) continue;
meetingModifications.push(eventModification);
} catch (error) {
console.log(eventModificationId, date.toLocaleString("en-US")); // log 2
continue;
}
}

meetingModifications.sort((a, b) => {
const dateTimeA = a.start?.dateTime ?? "";
const dateTimeB = b.start?.dateTime ?? "";
return dateTimeA.localeCompare(dateTimeB);
});
6 replies
DHDistant Horizons
Created by SharpieMaster on 12/26/2023 in #help-me
Error on world load
No description
6 replies
DHDistant Horizons
Created by SharpieMaster on 11/18/2023 in #help-me
Strange Rendering Behavior
For the water you can see it on the right side of the screen, and on the horizon when I zoom in. The door one is self explanatory.
21 replies
DHDistant Horizons
Created by SharpieMaster on 11/17/2023 in #help-me
(SOLVED: Distant Horizons 2.0.0-a requires Indium) Mod Incompatibility
No description
7 replies
TTCTheo's Typesafe Cult
Created by SharpieMaster on 10/11/2023 in #questions
optimistic update for complex data structure
I am making a recipe website with the t3-stack and I made something that "works" but is not very fast. I am kind of new to web dev with the t3 stack and I need some help
174 replies
TTCTheo's Typesafe Cult
Created by SharpieMaster on 10/8/2023 in #questions
Prisma types and enums with trpc + zod
is it possible to use prisma types and enums with zod, instead of having to manually construct your prisma tables in your trpc router
4 replies
TtRPC
Created by SharpieMaster on 9/26/2023 in #❓-help
trpc error fetch failed
please help
8 replies
TTCTheo's Typesafe Cult
Created by SharpieMaster on 9/25/2023 in #questions
t3 app router when?
when?
24 replies