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?
58 Replies
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
this is the other text above it
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
By the way, I don't see errors with the generation of the project. Are those warnings stopping you somehow?
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
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
aight so its commong seeing that and not being able to do anything right?
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
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)
Thank you guys both I was worried as a beginner I thought I was doing something wrong
second this
Use VIte don't use CRApp
or NextJS or Remix
I saw that every warning is not a big of a deal in a humoristic way
Even React doesn't recommend using CRApp anymore
just remember, you have to make that determination for yourself before you release something for production
yea ill take care of it as much as i can
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
CRApp is create react app right?
yeah
alright thank you everyone
btw how is vite gonna help me?
with this error: it might not depend on the same packages that are vulnerable
in general: it is much, much faster
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
I'm kinda beginner can I use NextJS?
Better than CRA
CRA is not the way
period.
Least NextJS would be closer to how real websites work
I only want to build websites
not some DOM injected App like CRA.. (spa)
Then learn NextJS or Remix. Or enjoy life and use Kit
Or don't use React period to build websites 10 better ways >.>;; (this is only my shat opinion lol)
alright thank you!
kinda confusing conversation but I think I will understand everything as long as I improve
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.
ok let's summarize if I understood correctly it's better to learn nextjs that react right?
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
Start a New React Project ā React
The library for web and native user interfaces
Literally how their docs tell you to do it now
npx create-next-app@latest
this way i will be using react with nextjs?
npx create-remixI'd do this' cause Remix fits my mental model lol (and does proper Forms) yes for the 5th time xD
its my first time hearing about remix ive only heard about nextjs
I keep trying to say it differently, but I feel like I'm confusing you more lol
yea mb its just new stuff to me soooo...
all good lol
I'll go watch some tutorials and ill come back here later š
thanks for your time š
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
ill stick with one
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
im gonna go with nextjs because its the only one ive heard of before
No now you have heard of Astro, Remix too
don't just pick whats popular xD
i really dont know what to do hahaha
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 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
how long have you been coding?
ehhh š¤·āāļø
off and on for years
modern dev about 4 years but mostly learning and using other tools to build with.
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?
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
i think im in a good level in javascript so i can go on react
Have you build a normal website?
yea i have but they are not online i have just the files
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
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 š
we have derailed this thread into more of a discussion though now xD
meh that is for designers to do
true but I want to improve on that
this is the hero section of the last website i built i think the design is pretty mid