Kevin Powell - Community

KPC

Kevin Powell - Community

A friendly place for developers to meet other devs, ask questions, get help, and just have a good time ๐Ÿ™‚.

Join

front-end

resources

back-end

ui-ux

os-and-tools

Newbie in back end

I have a project that im doing for school, but im getting this error everytime and also im having some issues using xampp I want to make a register form and a login form and also the website will have a session so when i go to other html files its still getting that im in the same email what i wanted to do is...

How to delete a table data at once?

how to delete all the rows in a specific table in supabase using react query

need help with hosting a simple website

hi, i am new to hosting projects, i just hosted a simple node + express application on netlify and i seem to be having issues. in my node server.js file i have this app.get("/course/:id", (req, res) => { but when i go to "mynetlifyurl/course/1" i get the netlify page not found error ...

req.body returns undefined

haya!!. So today i was thinking of trying out backend. and i installed express and nodemon and started working on it. everything seemed to be working fine until I made a form in my html and tried to receive and log data in my server.js. But it seems like req.body always returns undefined . I know the server and client side is working fine cause when I submit, it gives my the error I coded in the server.post(). That means i am indeed sending post req to my server . Here is the github code the...

Arrows function can't be hoisted?

I saw this comment on a post on X. I know that functions are hoisted to the top but I have no idea about arrow functions. Are they really not hoisted to the top?...
No description

MERN Stack - Search box returning empty array

Hi. I'm developing a MERN stack web app, and am encountering a problem with my search box where if keywords provided in the search box do not match any product in the database, array returns [], whereas it is supposed to throw an error and therefore trigger react toastify for a 'product not found' notification. I'm unsure whether the problem is in the front or backend part of the project, but I provided all of the files I thought were of use. If anyone could help, I'd be very grateful. Let me kn...

Help setting up

Hi! So I am new to back-end, decided to learn it via a tutorial Can anyone help me get started? I've tried several things as to a workable demo (as that is required in step 1), but so far I've got no luck correctly launching the page outside of the Live Server from vsc...

Deploying...

I need help, I want to learn how to do the back-end, so I'm following this tutorial: https://www.freecodecamp.org/learn/back-end-development-and-apis/managing-packages-with-npm/how-to-use-package-json-the-core-of-any-node-js-project-or-npm-package So I forked it and I figured I'll put it up on netlify, yet I keep on getting page not found do I need to do smth special? do In eed to have the paid plan, why is it not deploying...
No description

How do I publish a public lib locally without adding a `run` script just for me?

Here's the context: I've built my own public library. I'm also building an app that uses this library. I may need to modify the library to fit the app's use case, and until the dust settles on that effort, I do not want to npm publish the library while I iterate on this use case. When lib is modified, I'd like to publish locally so my app can get the latest code. The only way I know how to do that is to add a npm run build-and-publish-locally-because-i-am-iterating-on-app to lib's package.json. That feels wrong: lib is open source, intended to be used by strangers, and I don't want to accidentally publish that script if I need to fix an unexpected, unrelated lib bug. Is there a better approach to this problem? I don't think I'm the first person to create my own library for my own app. How do most handle this?...

Setting up a php developer environment using Docker

How do you setup a php developer environment using docker along with a database, and node since ill be doing a small practice fullstack project?

CSS Sticky Mystery

Hey There, I hope you are well? I should point out I am not a coder at all - but i do know enough to be no bother whatsoever. I am trying to implement a Sticky element in my site which I have made with Adobe Muse (it is outdated, I know...). ...

HTML and API issue

Hi everyone i need serious help right now. so i have made an api with a sqlite3 database that holds values of name, rating, and id(that is auto given) and i am making a html client app that allows a user to edit this database using http methods, i have got GET and DELETE working but i am struggling severely with the POST and PUT methods and was wondering if anyone specializes in anything similar. Please help and thanks for your time

CORS keeps blocking request during preflight on the browser

I'm trying to access my API from the browser but the request is blocked by CORS, with the error "Access to XMLHttpRequest at 'http://localhost/3001/auth/login/staff' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource." I tried adding Access-Control-Allow-Origin to allow headers in Cors config but it's not working, I've tested the endpoint on Postman and it works, I'm attaching screenshots of my code(I don't know how to setup nestjs in code sandbox), here's the link to GitHub https://github.com/johnpatrick254/School-Management-System/ on client-webapp branch Any assistance will be highly appreciated!...
No description

Problem with google provider and next-auth.

Im having difficulties figuring out how to fix this error: nique constraint failed on the constraint: users_username_key { message: '\n' + 'Invalid prisma.user.create() invocation:\n' +...

I'm building a library. Is there a logger that can be configured by the user?

For those that know Java, I'm basically asking if slf4j exists in node. For those that don't know Java, I'm building a library that needs to output logs to: 1. Give me enough information to troubleshoot issues when apps use it....

My Svelte app compiles, but dies on loading. โธ˜Whyโ€ฝ

I'm working on my first Svelte app, & it dies in the browser with: ``js Uncaught Error: No element #globe` found. at instance (App.svelte:5:7) at init (Component.js:135:5)...

How to convert Buff to File Without locally saving it

How do you convert buff to a file? I have an endpoint that modifies images uploaded, and that endpoint returns buffs. Afterwards, I need these buffs to be uploaded in which I will call a service to do that, and the service I'm using requires File to upload the image. How would I do it so that the image is not saved and just passed to the function? ```jsx...

product variants for webshop

Hello! I have been working on a webshop with php and mariadb(mysql). Im working on the product page but im having struggles with product variants. With product variants i mean that one product could have different variants. for example: one hoodie can be in different colors and sizes. One phone can be in different colors, different ram and storage. for the database tables, i have a table for just products that i use for the product list and the idea was to make separate tables for variants that's linked to the an product item....

before unload event - how to change default message "Changes you made may not be saved"?

I created issue - so it would be cool if you know hot to show custom message and answer there https://github.com/vercel/next.js/issues/60696...
No description