tropic
tropic
Explore posts from servers
TTCTheo's Typesafe Cult
Created by tropic on 2/14/2024 in #questions
How to fix markdown rendering with ShadCN/ Tailwind
Hi, I am trying to render markdown from my DB but in darkmode specifically, some of my H tags arent taking the color from the tailwind class. Here is the code below
6 replies
TTCTheo's Typesafe Cult
Created by tropic on 8/19/2023 in #questions
Hydration Failed Error in Next.js: Mismatch Between Server and Client Rendered HTML
Hello fellow developers, I've been working on a Next.js application, and I've encountered a "Hydration Failed" error that I'm struggling to resolve. The issue arises when the initial UI rendered on the server doesn't match what's rendered on the client, particularly when dealing with small screen sizes. This Code is to render some Initial items on the left that you can click on and see a detailed view on the right(not implemented yet). On small screens I want to just redirect to the details page for that particular item instead.
18 replies
CC#
Created by tropic on 5/30/2023 in #help
❔ Image is not being displayed On Azure
In an application we get images of pdf files from the database in the form of a byte[]. When you use the preview button it is to open a new tab and display that file. IN development it shows up fine but once it is deployed to Azure on app service, Its just a blank page with no URL or any thing. I am requesting help debugging it.
protected void cppreview_Callback(object sender, CallbackEventArgsBase e)
{
using (var uow = new OriginationUow())
{
var id = new Guid(Convert.ToString(hdf_attchmentid.Get("attachmentid")));
var file = uow.Attachments.GetAll().Where(o => o.InvoiceId == (id));

foreach (var item in file)
{
byte[] fileBytes = item.FileDetails;
var filename = item.DocName;

if (filename.EndsWith(".pdf"))
{

Session["PdfFile"] = fileBytes;
Session["PdfId"] = id;
_name = "View/Attachment/PdfFile.aspx";
}
}

cppreview.JSProperties["cpResult"] = _name;
}
}
protected void cppreview_Callback(object sender, CallbackEventArgsBase e)
{
using (var uow = new OriginationUow())
{
var id = new Guid(Convert.ToString(hdf_attchmentid.Get("attachmentid")));
var file = uow.Attachments.GetAll().Where(o => o.InvoiceId == (id));

foreach (var item in file)
{
byte[] fileBytes = item.FileDetails;
var filename = item.DocName;

if (filename.EndsWith(".pdf"))
{

Session["PdfFile"] = fileBytes;
Session["PdfId"] = id;
_name = "View/Attachment/PdfFile.aspx";
}
}

cppreview.JSProperties["cpResult"] = _name;
}
}
44 replies
TTCTheo's Typesafe Cult
Created by tropic on 4/20/2023 in #questions
Headless UI Stops Working when Adding addition elements to components
I have this component that I am trying to add a header to from tailwind UI, But when I add the header it no longer works. Here is the link to the repo I have working.tsx which is working vs index which is not working https://github.com/Tropic-OSS/Avias-Creations/blob/dev/src/pages/working.tsx https://github.com/Tropic-OSS/Avias-Creations/blob/dev/src/pages/index.tsx
11 replies
TTCTheo's Typesafe Cult
Created by tropic on 4/16/2023 in #questions
Auth0 Problems within T3 App - ID Too Long
Hey there, I am having some issues with auth0 Provider in ct3 using the prisma provider generated. I added the auth0 provider but now I am getting this error anytime I use the sign in button
Invalid `p.account.create()` invocation in
/home/ubuntu/code/apollo-computers/node_modules/.pnpm/@next-auth+prisma-adapter@1.0.5_olz4gynuwklrt45ffo7wirvoly/node_modules/@next-auth/prisma-adapter/dist/index.js:19:42

16 },
17 updateUser: ({ id, ...data }) => p.user.update({ where: { id }, data }),
18 deleteUser: (id) => p.user.delete({ where: { id } }),
→ 19 linkAccount: (data) => p.account.create(
The provided value for the column is too long for the column's type. Column: access_token Error:
Invalid `p.account.create()` invocation in
/home/ubuntu/code/apollo-computers/node_modules/.pnpm/@next-auth+prisma-adapter@1.0.5_olz4gynuwklrt45ffo7wirvoly/node_modules/@next-auth/prisma-adapter/dist/index.js:19:42

16 },
17 updateUser: ({ id, ...data }) => p.user.update({ where: { id }, data }),
18 deleteUser: (id) => p.user.delete({ where: { id } }),
→ 19 linkAccount: (data) => p.account.create(
The provided value for the column is too long for the column's type. Column: access_token
at fn.handleRequestError (/home/ubuntu/code/apollo-computers/node_modules/.pnpm/@prisma+client@4.12.0_prisma@4.12.0/node_modules/@prisma/client/runtime/library.js:174:6477)
at fn.handleAndLogRequestError (/home/ubuntu/code/apollo-computers/node_modules/.pnpm/@prisma+client@4.12.0_prisma@4.12.0/node_modules/@prisma/client/runtime/library.js:174:5907)
at fn.request (/home/ubuntu/code/apollo-computers/node_modules/.pnpm/@prisma+client@4.12.0_prisma@4.12.0/node_modules/@prisma/client/runtime/library.js:174:5786)
at async t._request (/home/ubuntu/code/apollo-computers/node_modules/.pnpm/@prisma+client@4.12.0_prisma@4.12.0/node_modules/@prisma/client/runtime/library.js:177:10477) {
name: 'LinkAccountError',
code: 'P2000'
}
Invalid `p.account.create()` invocation in
/home/ubuntu/code/apollo-computers/node_modules/.pnpm/@next-auth+prisma-adapter@1.0.5_olz4gynuwklrt45ffo7wirvoly/node_modules/@next-auth/prisma-adapter/dist/index.js:19:42

16 },
17 updateUser: ({ id, ...data }) => p.user.update({ where: { id }, data }),
18 deleteUser: (id) => p.user.delete({ where: { id } }),
→ 19 linkAccount: (data) => p.account.create(
The provided value for the column is too long for the column's type. Column: access_token Error:
Invalid `p.account.create()` invocation in
/home/ubuntu/code/apollo-computers/node_modules/.pnpm/@next-auth+prisma-adapter@1.0.5_olz4gynuwklrt45ffo7wirvoly/node_modules/@next-auth/prisma-adapter/dist/index.js:19:42

16 },
17 updateUser: ({ id, ...data }) => p.user.update({ where: { id }, data }),
18 deleteUser: (id) => p.user.delete({ where: { id } }),
→ 19 linkAccount: (data) => p.account.create(
The provided value for the column is too long for the column's type. Column: access_token
at fn.handleRequestError (/home/ubuntu/code/apollo-computers/node_modules/.pnpm/@prisma+client@4.12.0_prisma@4.12.0/node_modules/@prisma/client/runtime/library.js:174:6477)
at fn.handleAndLogRequestError (/home/ubuntu/code/apollo-computers/node_modules/.pnpm/@prisma+client@4.12.0_prisma@4.12.0/node_modules/@prisma/client/runtime/library.js:174:5907)
at fn.request (/home/ubuntu/code/apollo-computers/node_modules/.pnpm/@prisma+client@4.12.0_prisma@4.12.0/node_modules/@prisma/client/runtime/library.js:174:5786)
at async t._request (/home/ubuntu/code/apollo-computers/node_modules/.pnpm/@prisma+client@4.12.0_prisma@4.12.0/node_modules/@prisma/client/runtime/library.js:177:10477) {
name: 'LinkAccountError',
code: 'P2000'
}
9 replies
TTCTheo's Typesafe Cult
Created by tropic on 3/12/2023 in #questions
Hey I am getting an error in my newly generated ct3 app saying that it cannot read file tscofig.json
5 replies
SIASapphire - Imagine a framework
Created by tropic on 3/11/2023 in #sapphire-support
Hey what is DEVELOPMENT MODE and how do I disable it
I tried setting the Node_Env to something else but it did not change it in the console
7 replies
SIASapphire - Imagine a framework
Created by tropic on 3/8/2023 in #sapphire-support
Unable to get member data from users that have left / kicked
Hi, I am trying to get data from members who have left the discord server or have been kicked. But I keep getting undefined errors and I am unsure why here is my code. This only happen in sapphire
@ApplyOptions<Listener.Options>({ event: Events.GuildMemberRemove, name: 'Handle Guild Member Kick/Leave' })
export class MemberRemove extends Listener {
public async run(guild: Guild, member: PartialGuildMember) {
console.log(member); }
}
@ApplyOptions<Listener.Options>({ event: Events.GuildMemberRemove, name: 'Handle Guild Member Kick/Leave' })
export class MemberRemove extends Listener {
public async run(guild: Guild, member: PartialGuildMember) {
console.log(member); }
}
12 replies
TTCTheo's Typesafe Cult
Created by tropic on 1/22/2023 in #questions
Running automated jobs for different discord servers via discord bot
Hi, I am implementing a feature to automatically post some content on reddit via their api using a discord bot. Now my problem is how do I schedule the time for this posting to happen so that each individual server can post without me polling the DB for the time that was set to post
2 replies
SIASapphire - Imagine a framework
Created by tropic on 1/19/2023 in #sapphire-support
Hi I am getting a permissions error when trying to run docker-compose up
THis is the error that I am getting
Attaching to bot_botler-dev_1
botler-dev_1 |
botler-dev_1 | > botler@1.0.0 predocker:watch
botler-dev_1 | > npm install
botler-dev_1 |
botler-dev_1 | npm ERR! code EACCES
botler-dev_1 | npm ERR! syscall mkdir
botler-dev_1 | npm ERR! path /opt/app/node_modules
botler-dev_1 | npm ERR! errno -13
botler-dev_1 | npm ERR! Error: EACCES: permission denied, mkdir '/opt/app/node_modules'
botler-dev_1 | npm ERR! [Error: EACCES: permission denied, mkdir '/opt/app/node_modules'] {
botler-dev_1 | npm ERR! errno: -13,
botler-dev_1 | npm ERR! code: 'EACCES',
botler-dev_1 | npm ERR! syscall: 'mkdir',
botler-dev_1 | npm ERR! path: '/opt/app/node_modules'
botler-dev_1 | npm ERR! }
botler-dev_1 | npm ERR!
botler-dev_1 | npm ERR! The operation was rejected by your operating system.
botler-dev_1 | npm ERR! It is likely you do not have the permissions to access this file as the current user
botler-dev_1 | npm ERR!
botler-dev_1 | npm ERR! If you believe this might be a permissions issue, please double-check the
botler-dev_1 | npm ERR! permissions of the file and its containing directories, or try running
botler-dev_1 | npm ERR! the command again as root/Administrator.
botler-dev_1 |
botler-dev_1 | npm ERR! A complete log of this run can be found in:
botler-dev_1 | npm ERR! /home/node/.npm/_logs/2023-01-19T00_30_24_046Z-debug-0.log
Attaching to bot_botler-dev_1
botler-dev_1 |
botler-dev_1 | > botler@1.0.0 predocker:watch
botler-dev_1 | > npm install
botler-dev_1 |
botler-dev_1 | npm ERR! code EACCES
botler-dev_1 | npm ERR! syscall mkdir
botler-dev_1 | npm ERR! path /opt/app/node_modules
botler-dev_1 | npm ERR! errno -13
botler-dev_1 | npm ERR! Error: EACCES: permission denied, mkdir '/opt/app/node_modules'
botler-dev_1 | npm ERR! [Error: EACCES: permission denied, mkdir '/opt/app/node_modules'] {
botler-dev_1 | npm ERR! errno: -13,
botler-dev_1 | npm ERR! code: 'EACCES',
botler-dev_1 | npm ERR! syscall: 'mkdir',
botler-dev_1 | npm ERR! path: '/opt/app/node_modules'
botler-dev_1 | npm ERR! }
botler-dev_1 | npm ERR!
botler-dev_1 | npm ERR! The operation was rejected by your operating system.
botler-dev_1 | npm ERR! It is likely you do not have the permissions to access this file as the current user
botler-dev_1 | npm ERR!
botler-dev_1 | npm ERR! If you believe this might be a permissions issue, please double-check the
botler-dev_1 | npm ERR! permissions of the file and its containing directories, or try running
botler-dev_1 | npm ERR! the command again as root/Administrator.
botler-dev_1 |
botler-dev_1 | npm ERR! A complete log of this run can be found in:
botler-dev_1 | npm ERR! /home/node/.npm/_logs/2023-01-19T00_30_24_046Z-debug-0.log
27 replies
TTCTheo's Typesafe Cult
Created by tropic on 1/15/2023 in #questions
How can I efficiently retrieve settings from my database?
5 replies
TTCTheo's Typesafe Cult
Created by tropic on 1/5/2023 in #questions
Hi, I am getting a hydration error and I am hella confused on why. I dont see any incorrect tsx here
I am trying to make a table but for some reason im getting a hydration error on this one page
40 replies
TTCTheo's Typesafe Cult
Created by tropic on 12/31/2022 in #questions
Hey..... I am trying to implement some sort of sidebar, How do I go to correct path
I am not sure how to get the [id] so I can prefix all my paths to make it navigate to the right page test.com/90923 -> test.com/90923/settings -> test.com/90923/links etc
15 replies
TTCTheo's Typesafe Cult
Created by tropic on 12/6/2022 in #questions
Getting dupilcate data from table pagination
6 replies
TTCTheo's Typesafe Cult
Created by tropic on 12/5/2022 in #questions
Using getServerSideProps vs TRPC in T3Stack
Hey quick thing, should I use getServerSideProps use or trpc.auth.getSession to check for auth when loading pages ?
6 replies
TTCTheo's Typesafe Cult
Created by tropic on 12/3/2022 in #questions
How do I get and save the access token from discord oauth create-t3-app
Hi, I have been searching around for a solution to this for 3 hours now, I am probably retarded. I am trying to get all the guilds from discord, but I need the access token for authorization using next auth in my t3-app. When adding the token to the session call back it errors out. I tried to use the jwt call back along with the session call back to see if thats what was needed with no luck. Link to solutions that I have tried: https://next-auth.js.org/configuration/callbacks#session-callback https://stackoverflow.com/questions/72759053/not-able-to-get-the-access-token-for-discord-user-next-auth https://github.com/mac-eth/nextjs-nextauth-discord-tutorial
6 replies
TTCTheo's Typesafe Cult
Created by tropic on 11/30/2022 in #questions
Central Rest API Vs Direct Database Connection For Data Queries
7 replies
TTCTheo's Typesafe Cult
Created by tropic on 10/31/2022 in #questions
Can I use PostgreSQL as a timeseries database
Hi, I am doing a project to possibly use as my final major project at UNI...I know there are database hosting sites out there specifically for this but I am a tinkerer and was wondering if it a good idea to use PostgreSQL to store time series data. I am away that for a small scale project it doesn't matter but If I were to offer this as a full service would it end up biting me in the ass in the future.
14 replies