React Too Many Errors

I tried doing npx create-react-app my-react-app and i got many errors then i tried npm audit fix --force and i got even more, what could it be?
No description
58 Replies
Jimster
Jimsterā€¢9mo ago
It's my first time using react so I don't really know what's going on i tried using chatgpt to help me solve the problem but it didn't help that much
Jimster
Jimsterā€¢9mo ago
this is the other text above it
No description
Daryl
Darylā€¢9mo ago
If you're starting out with React, I'd recommend using Vite instead Create React App: https://vitejs.dev/guide/#scaffolding-your-first-vite-project
Vite
Next Generation Frontend Tooling
Daryl
Darylā€¢9mo ago
By the way, I don't see errors with the generation of the project. Are those warnings stopping you somehow?
Jimster
Jimsterā€¢9mo ago
by errors i mean the text saying 6 high severity vulnerabilities and i assumed that they will be a problem btw idk what vite is
Jochem
Jochemā€¢9mo ago
welcome to NPM not much you can do about it but check again later if those are fixed in a way that doesn't break your project
Jimster
Jimsterā€¢9mo ago
aight so its commong seeing that and not being able to do anything right?
Jochem
Jochemā€¢9mo ago
unfortunately, yes you'll have to judge on your own if the vulnerabilities apply to your code base, and if they're worth the risk deploying to your production site
Daryl
Darylā€¢9mo ago
If you want more information about this @Jimster, you can take a look to this article: https://overreacted.io/npm-audit-broken-by-design/#why-is-npm-audit-broken
npm audit: Broken by Design
Found 99 vulnerabilities (84 moderately irrelevant, 15 highly irrelevant)
Jimster
Jimsterā€¢9mo ago
Thank you guys both I was worried as a beginner I thought I was doing something wrong
b1mind
b1mindā€¢9mo ago
second this Use VIte don't use CRApp or NextJS or Remix
Jimster
Jimsterā€¢9mo ago
I saw that every warning is not a big of a deal in a humoristic way
Jochem
Jochemā€¢9mo ago
Even React doesn't recommend using CRApp anymore
b1mind
b1mindā€¢9mo ago
No description
Jochem
Jochemā€¢9mo ago
just remember, you have to make that determination for yourself before you release something for production
Jimster
Jimsterā€¢9mo ago
yea ill take care of it as much as i can
Jochem
Jochemā€¢9mo ago
99% of the time, it's fine, but you can't just rely on "eh, it'll be fine" if you're building something for a client or your employer
Jimster
Jimsterā€¢9mo ago
CRApp is create react app right?
Jochem
Jochemā€¢9mo ago
yeah
Jimster
Jimsterā€¢9mo ago
alright thank you everyone btw how is vite gonna help me?
Jochem
Jochemā€¢9mo ago
with this error: it might not depend on the same packages that are vulnerable in general: it is much, much faster
b1mind
b1mindā€¢9mo ago
CRA is old outdated and frankly never was good from what I've been told. It was just the only defacto way to use React because webpack is so convoluted no one wants to configure it per project. Vite will be a 100x faster and better experience and supports most other JS UI frameworks too. NextJS or Remix is what I'd use if I was making a website though. (personally I'd use Remix) Vite + React for an App
Jimster
Jimsterā€¢9mo ago
I'm kinda beginner can I use NextJS?
b1mind
b1mindā€¢9mo ago
Better than CRA CRA is not the way period. Least NextJS would be closer to how real websites work
Jimster
Jimsterā€¢9mo ago
I only want to build websites
b1mind
b1mindā€¢9mo ago
not some DOM injected App like CRA.. (spa) Then learn NextJS or Remix. Or enjoy life and use svelte Kit Or don't use React period to build websites 10 better ways >.>;; (this is only my shat opinion lol)
Jimster
Jimsterā€¢9mo ago
alright thank you! kinda confusing conversation but I think I will understand everything as long as I improve
b1mind
b1mindā€¢9mo ago
Understand what SSR(server side rendering)/SPA(single page application)/MPA(multipage application, aka a normal website lol)/SSG (server side generation, aka static website) are then things might become more clear but I think you should have a solid understanding of those terms. React is a UI framework (or library for those being pedantic) NextJS/remix are "meta frameworks" that provide the above acronyms.
Jimster
Jimsterā€¢9mo ago
ok let's summarize if I understood correctly it's better to learn nextjs that react right?
b1mind
b1mindā€¢9mo ago
You will be learning React while learning NextJS If you want to make a website this is teh way You can't use NextJS without it
b1mind
b1mindā€¢9mo ago
Literally how their docs tell you to do it now
npx create-next-app@latest
Jimster
Jimsterā€¢9mo ago
this way i will be using react with nextjs?
b1mind
b1mindā€¢9mo ago
npx create-remix
I'd do this' cause Remix fits my mental model lol (and does proper Forms) yes for the 5th time xD
Jimster
Jimsterā€¢9mo ago
its my first time hearing about remix ive only heard about nextjs
b1mind
b1mindā€¢9mo ago
I keep trying to say it differently, but I feel like I'm confusing you more lol
Jimster
Jimsterā€¢9mo ago
yea mb its just new stuff to me soooo...
b1mind
b1mindā€¢9mo ago
all good lol
Jimster
Jimsterā€¢9mo ago
I'll go watch some tutorials and ill come back here later šŸ˜› thanks for your time šŸ˜„
b1mind
b1mindā€¢9mo ago
well, its in the official docs now šŸ˜„ Remix is a solid solution Astro is a solid solution to use React to make websites too Honestly that is what I would do if I didn't need forms
Jimster
Jimsterā€¢9mo ago
ill stick with one
b1mind
b1mindā€¢9mo ago
meh I'd honestly look at them all and pic what makes most sense to you cause they all do things very different but if you are super new find the one that gets you started the fastest what ever lets you build
Jimster
Jimsterā€¢9mo ago
im gonna go with nextjs because its the only one ive heard of before
b1mind
b1mindā€¢9mo ago
No now you have heard of Astro, Remix too don't just pick whats popular xD
Jimster
Jimsterā€¢9mo ago
i really dont know what to do hahaha
b1mind
b1mindā€¢9mo ago
That is why I said take a quick look at the options spend a day and go yea.. that makes sense and go with it. Then if it does not work try a different one. Best thing about todays modern web is we have options on building websites. Lots of svelte Kit ā¤ļø Like I wont even touch React cause I think its overly complicated and to much abstractions with JSX and "just js bruh" SvelteKit is my love I didn't make that choice out of popularity I did it by building things. But yea point being you can't really go wrong with learning any of them long as you a building I'll leave it at that. just don't use CRA lol this has been a PSA
Jimster
Jimsterā€¢9mo ago
how long have you been coding?
b1mind
b1mindā€¢9mo ago
ehhh šŸ¤·ā€ā™‚ļø off and on for years modern dev about 4 years but mostly learning and using other tools to build with.
Jimster
Jimsterā€¢9mo ago
oh nice ive been coding only for a couple of months something else i saw recently is jquery would you recommend learning it or just stick with pure javascript for now?
b1mind
b1mindā€¢9mo ago
I would only learn* jQuery if you knew the job was going to use it its pretty dated and yea Ecma has most of it now in JS. I would spend some time in JS before jumping into React too btw only a few months? I would make sure you know how to build just a normal HTML/CSS website manipulate that website with JS using the DOM Learn more JS stuffs THEN move onto a JS UI/Meta framework. or PHP xD
Jimster
Jimsterā€¢9mo ago
i think im in a good level in javascript so i can go on react
b1mind
b1mindā€¢9mo ago
Have you build a normal website?
Jimster
Jimsterā€¢9mo ago
yea i have but they are not online i have just the files
b1mind
b1mindā€¢9mo ago
Cause imo that is super important too.. like don't just miss HTML/CSS and how it works. You will need to know how bad React makes working with those things šŸ¤£ jpjp but not .. Also don't just use Divs learn semantic html
Jimster
Jimsterā€¢9mo ago
yea i use semantic html too my websites are fully responsive as well the only problem i think is that they are not tha beautifule šŸ˜›
b1mind
b1mindā€¢9mo ago
we have derailed this thread into more of a discussion though now xD meh that is for designers to do
Jimster
Jimsterā€¢9mo ago
true but I want to improve on that
Jimster
Jimsterā€¢9mo ago
this is the hero section of the last website i built i think the design is pretty mid
No description
Want results from more Discord servers?
Add your server
More Posts