first time installing next js..
Unanswered
Morelet’s Crocodile posted this in #help-forum
Morelet’s CrocodileOP
following a youtube tutorial for fullstack development as a beginnerand i sometimes run into errors that idk how to solve them, if i could ask for help here it would be really helpful! thank you!
393 Replies
@Morelet’s Crocodile following a youtube tutorial for fullstack development as a beginnerand i sometimes run into errors that idk how to solve them, if i could ask for help here it would be really helpful! thank you!
Palomino
type in cmd into the window search bar
and also make sure you installed nodejs, etc
and also make sure you installed nodejs, etc
@Palomino type in cmd into the window search bar
and also make sure you installed nodejs, etc
Morelet’s CrocodileOP
hii thank u for replying
i think im trying to do that rn
i feel like im falling into some weird pipeline i have no idea
🥲
im on this github thing trying to find the download button... i feel stupid
@Morelet’s Crocodile Click to see attachment
Palomino
ah thats just the version manager you don’t really need that. you should be fine to just install node.js by itself nvm is more for advanced users who want more control
Morelet’s CrocodileOP
oh really okay
Palomino
Morelet’s CrocodileOP
thank you!! i swear i couldnt find this myself 😢
@Morelet’s Crocodile Click to see attachment
Palomino
if you want to use this
you need to go to
through
can use this if you want
Morelet’s CrocodileOP
should i go next
@Morelet’s Crocodile Click to see attachment
Palomino
can you expand the add to path one?
Morelet’s CrocodileOP
Palomino
should be find to press next
Morelet’s CrocodileOP
@Morelet’s Crocodile Click to see attachment
Palomino
leave it unchecked then press next
Morelet’s CrocodileOP
its installing
okay yay
Okay i have nodejs downloaded Back to nextjs..
i think
@Morelet’s Crocodile its installing
Palomino
once it finishes you might need to restart your pc through 

Morelet’s CrocodileOP
oh
Palomino
yeah
Morelet’s CrocodileOP
it kinda just finished
oky
Palomino
sometimes cmd, path doesn’t get regonzied
Morelet’s CrocodileOP
after i restart i cancontinue from this site right?
Palomino
yup
btw
i recommend using bun
bun is the fatest
bun is fastest then pnpm, npm, yarn
so you will need to get bun installed as well
Morelet’s CrocodileOP
thank you!! 🙏
😓😓
i have no idea what bun is
@Morelet’s Crocodile i have no idea what bun is
Palomino
its a package manager
its listed in the page you showed
its the last option
bun is better then all 3 through
Morelet’s CrocodileOP
oh yeah okay
i think its installing
Palomino
yup
2%
Morelet’s CrocodileOP
yay
Palomino
once this is all done
type node -v and then bun -v these should both work
Morelet’s CrocodileOP
did i do somethnig wrong
@Morelet’s Crocodile Click to see attachment
Palomino
you need to restart the terminal
Morelet’s CrocodileOP
ooo
it works now
im gonna put that command in now
omg finally something 😭
Palomino
nice gurt
you good now? do you need any more help?
Morelet’s CrocodileOP
ill let you know!
im gonna try to see what i have to do
🥲
Morelet’s CrocodileOP
after downloading nextjs do i have to do any of these next things on the site or is it just offreing alternatives?
@Morelet’s Crocodile omg finally something 😭
Saint Hubert Jura Hound
Running this command will have already created the files necessary to build a nextjs app in the folder u specified "my-app". So u dont need to create one manually.
You can use the
Youre gonna need a code editor to open and edit the files. As well as run commands. If you dont have one already i can recommend vscode, for beginners. Once you have it type
You can use the
dir command in that cmd window to list files in your current directory. The new project should be listed there. You can enter the project folder using cd my-app.Youre gonna need a code editor to open and edit the files. As well as run commands. If you dont have one already i can recommend vscode, for beginners. Once you have it type
code . in the cmd window. Thatll open the current directory in vscodeMorelet’s CrocodileOP
i have vccode!
vscode
🥹
im sorry this is my first time
and im not good with powershell
Saint Hubert Jura Hound
Perfect then just run
code . in the project folder and itll open everything up. You might wanna install some of the recommended extensions that will pop up in the bottom right after opening vscode. They'll help with things like formatting files and showing different colors for different keywords and values@Morelet’s Crocodile Click to see attachment
Saint Hubert Jura Hound
If u intalled vscode after opening this terminal, it might not have registered it yet
Try closing and opening the terminal
Or just press the windows key and open vscode manually, then search for the project folder through the vscode ui
Its good to get used to basic termnial commands though so i recommend opening it that way :)
@Morelet’s Crocodile Click to see attachment
Saint Hubert Jura Hound
Oh wait, you didnt leave a space after code. I just realized
@Saint Hubert Jura Hound If u intalled vscode after opening this terminal, it might not have registered it yet
Morelet’s CrocodileOP
i have had vscode before
Saint Hubert Jura Hound
The command youre running is
code then you pass whats called an argument. In this case . to specify the directory you wanna open using the code commandMorelet’s CrocodileOP
oh!!
it opened it
Saint Hubert Jura Hound
Nice
Morelet’s CrocodileOP
i can safely close terminal now right?
Saint Hubert Jura Hound
Yes
Vscode has a built in one too
Morelet’s CrocodileOP
oh?
Saint Hubert Jura Hound
You can look up the shortcut for it, i dont use vscode anymore so i dont remember
Morelet’s CrocodileOP
alrightt
im trynig to follow this tutorial
thatmeans i have to make a new folder and do stuff right
or No i guess the stuff he has is kind of similar that what i have on this setup thing already
@Morelet’s Crocodile or No i guess the stuff he has is kind of similar that what i have on this setup thing already
Saint Hubert Jura Hound
Yes exactly, he probably ran the same command
When is the tutorial from?
Like from what year?
Morelet’s CrocodileOP
Jul 26, 2023
Saint Hubert Jura Hound
Hmm its a bit old. Nextjs releases new features pretty quickly so that tutorial is already pretty outdated. I recommend thinking about searching for the nextjs documentation and using that to learn instead
U dont have to read or memorize everything, just look around a bit to see whats possible
Morelet’s CrocodileOP
thank you!
but the tutorial is still kind of fine right?
like to leanr stuff from?
or is the language thingy terminology documentation or whatever its called too outdated to use
Saint Hubert Jura Hound
In the last 3 years there have been some pretty big new features, so if u do wanna start with video tutorials u should probably look for a newer one
If u wanna understand something specific you should use the docs though, theyll always have the most up to date info
Morelet’s CrocodileOP
question
when i press go live
it always opens this thing
i know im supposed to run to like localhost in the url to open up stuff but
i swear before when i followed tutorials to make basic front end html whatever sites it would open it up directly
when theres more files does it just do this
Morelet’s CrocodileOP
does going live do the same thing as doing it from the terminal?
Morelet’s CrocodileOP
for some reason some errors popped up and its because i think they cant find the address of whatever it is but my files are .ts not .js, would simply renaming it help? 😰
Morelet’s CrocodileOP
okay no that does not help
Morelet’s CrocodileOP
is this what i needed to do to fix it?
@Morelet’s Crocodile Click to see attachment
Saint Hubert Jura Hound
Definitely not. Youre asking bun to install a package called tsconfig.json. if that actually installed something youll definitely want to uninstall it using the same bun command. Run bun -h for help
@Saint Hubert Jura Hound https://nextjs.org/docs/app/getting-started/installation#run-the-development-server
Saint Hubert Jura Hound
These docs tell you how to start the server
@Saint Hubert Jura Hound These docs tell you how to start the server
Morelet’s CrocodileOP
wait but what abt the validatin error (?) i think i managed to start the server
@Morelet’s Crocodile for some reason some errors popped up and its because i think they cant find the address of whatever it is but my files are .ts not .js, would simply renaming it help? 😰
Saint Hubert Jura Hound
I assume that pic on the left is from a d.ts file. You can look up what those are but generally you dont wanna touch nextjs's d.ts file
Morelet’s CrocodileOP
this thing
Saint Hubert Jura Hound
Oh, yea the .next file contains build/dev server data, you generally also dont need to touch stuff in there
Morelet’s CrocodileOP
if it has a problem does that mean i cant run it
Saint Hubert Jura Hound
Have u tried to run it?
Morelet’s CrocodileOP
i guess it works
Saint Hubert Jura Hound
alr nice
Morelet’s CrocodileOP
thank you so far for the help!!!
Saint Hubert Jura Hound
Yee no problem good luck :)
Morelet’s CrocodileOP
i have an issue
idk what im donig wrong
its supposed to show up lik ethis
do i have to import react in this page itself
Morelet’s CrocodileOP
ok turning it off and on again worked
Morelet’s CrocodileOP
@Morelet’s Crocodile Click to see attachment
Palomino
if your asking why you don’t have the classes
you need to get tailwind
Morelet’s CrocodileOP
i think i have tailwind on
Palomino
set up from 2
@Morelet’s Crocodile i think i have tailwind on
Palomino
r u sure?!
Morelet’s CrocodileOP
i might not
sorry im as bad as chatgpt hallucinating things not even there
Palomino
wait what is the issue
@Morelet’s Crocodile Click to see attachment
Morelet’s CrocodileOP
so he did this right
i followed him but for some reason the profile/thing doesnt show up in my page when i do it
am i doing something wrong
why isnt it showing up
and i downloaded tialwind
Palomino
can you inspect element
and show
Morelet’s CrocodileOP
@Morelet’s Crocodile Click to see attachment
Palomino
can you press x on this
then retake screenshot
@Morelet’s Crocodile Click to see attachment
Palomino
also can you please format your code 

i can’t read it
and its messing with my ocd
Morelet’s CrocodileOP
am sorry
😭
i will try
@Morelet’s Crocodile i will try
Palomino
should be able to right click and a menu should pop up
and then press format document
Morelet’s CrocodileOP
is this better
@Palomino can you press x on this
Morelet’s CrocodileOP
wiat but X closes it do you want me to make it bigger
@Morelet’s Crocodile Click to see attachment
Palomino
yes
@Morelet’s Crocodile wiat but X closes it do you want me to make it bigger
Palomino
not the top x
the one here
you don’t need this
and its making it hard to read the rest of the css
Morelet’s CrocodileOP
oh
Palomino
lol
Morelet’s CrocodileOP
my bad
do i pull it higher
😰
Palomino
can you select the element that please
Morelet’s CrocodileOP
Palomino
press this and rhen select the texy
@Morelet’s Crocodile Click to see attachment
Palomino
hmm
i think i see the issue
Morelet’s CrocodileOP
Palomino
can you try using bg-pink-100
instead of bg-pink
Morelet’s CrocodileOP
omg a box showed up but still no text
Palomino
can you show me how you are using userprofile
oh wait
yeah
can you show me how your usingitnpleas
@Morelet’s Crocodile
Morelet’s CrocodileOP
hi
umm
wydm
@Morelet’s Crocodile wydm
Palomino
like where are you importing profile page
Morelet’s CrocodileOP
like it looks like this rn
Palomino
oh i think i know
i know your issue!
Morelet’s CrocodileOP
yay!! thank you
@Morelet’s Crocodile Click to see attachment
Palomino
ok so your doing this wrong
Morelet’s CrocodileOP
mhm
Palomino
you need to remove the params from the top
Morelet’s CrocodileOP
okok
is it cuz this tutorial is outdated or something
i tried to look on the website for stuff related to this grabbing serving thing but i wasnt finding anything
Palomino
at the top
put
import { useParams } from 'next/navigation'
put
import { useParams } from 'next/navigation'
then instead the function
inside*
put
const params = useParams<{ id: number; }>()
and then see if that works
Morelet’s CrocodileOP
do i still keep this
Palomino
yes
@Palomino at the top
put
import { useParams } from 'next/navigation'
Morelet’s CrocodileOP
i see i see
so in the case that i make a bunch of different pages like this i have to import this use params every time
Palomino
it should work now
lmk if it doesnt
Morelet’s CrocodileOP
@Morelet’s Crocodile Click to see attachment
Palomino
try switching to
const params = useParams()
const params = useParams()
instead of what i gave you
see if that works
Morelet’s CrocodileOP
i tried with /abc and /123 but they dont show anything
@Morelet’s Crocodile i tried with /abc and /123 but they dont show anything
Palomino
thats bc you removed the {params. thingy from your code
i dont see it anymore

Morelet’s CrocodileOP
oh
wat duh heck
when did i remove that im so stupid
holon
Palomino
lmfaoo
Morelet’s CrocodileOP
omg it works now
thank you!!
do you know where the documentation is for this
so i can read about it a bit more
Morelet’s CrocodileOP
thank you
Morelet’s CrocodileOP
also this is really coo and all so that it can put the name and stuff but what practical use is there ? like when you log into an acount does this param thing for profiles show like the data from their account and whatnot
Nvm im reading the website
this is more of a shopping site thing
@Morelet’s Crocodile also this is really coo and all so that it can put the name and stuff but what practical use is there ? like when you log into an acount does this param thing for profiles show like the data from their account and whatnot
Palomino
for example if you wanted to view a profile for a specific user, this would come in handy or something like messaging a certain user, or like to get the group or something your in a lot of cool stuff can use that for. also for like a shop item or something
Morelet’s CrocodileOP
So in a database theyd be tagged by these thnigs, you only make one page with a template and whenever it loads something it puts in the tags from then right
@Morelet’s Crocodile this is more of a shopping site thing
Palomino
it also can be for community shit
because discord uses it
with their ids
Morelet’s CrocodileOP
oohhh what
Palomino
you never noticed that?!
theres always a channel, user, etc id
in the tab
Morelet’s CrocodileOP
oh this
aaaaaaaa
omg
Palomino
yes
Morelet’s CrocodileOP
this is so cool
im learning so much
Palomino
useparams can accept more then one params
ofc
Morelet’s CrocodileOP
Palomino
theres a similar thing called useSearchParams which is pretty cool
Morelet’s CrocodileOP
i will check it out!!
can i import javascript libraries onto this application thing?
@Morelet’s Crocodile can i import javascript libraries onto this application thing?
Palomino
depends what libraries
Morelet’s CrocodileOP
i had this tarot card thingy library that i found
Palomino
can you send
Morelet’s CrocodileOP
yes
this is kind of a long shot for later
but i was curious
cuz i wanted to make a loginable trackable tarot reading app thing
or if that doesnt work just a mood tracker
Palomino
i think it should be fine
Morelet’s CrocodileOP
yuppi
thankyew
Morelet’s CrocodileOP
is there something wrong with this address thing
@Morelet’s Crocodile is there something wrong with this address thing
Palomino
can you hover over it
@Palomino can you hover over it
Morelet’s CrocodileOP
@Morelet’s Crocodile Click to see attachment
Palomino
try removing the .ts extension
what happens then
@Palomino try removing the .ts extension
Morelet’s CrocodileOP
it works nowww thank you
what does this mean
is it cuz the colors didnt show up when i made this constant so they dont know what this is
@Morelet’s Crocodile Click to see attachment
Palomino
can you show the file
and where is it at
Morelet’s CrocodileOP
yeah
Palomino
oh i see
you made a syntax error!
Morelet’s CrocodileOP
reallyy
oh no
Palomino
its password: {
isverifed: {
, etc
not password {
Morelet’s CrocodileOP
oh!!
Palomino
you forgot the colon
lmfao
Morelet’s CrocodileOP
okay i fixed it i think
Palomino
yup
there we go
Morelet’s CrocodileOP
😰
idk why the hash thing doesnt work
Palomino
lol 19 problems
wtf did you do

also
don’t use third party
@Morelet’s Crocodile
you don’t need third party
Morelet’s CrocodileOP
what third party
@Morelet’s Crocodile what third party
Palomino
bcrypt.js is a third party
you dont need it
your using bun
@Palomino lol 19 problems
Morelet’s CrocodileOP
suddenly all my user things turned to squigglies
@Palomino bcrypt.js is a third party
Morelet’s CrocodileOP
oh i was just following whatever the guy was doing
Palomino
you can uninstall bcrypt.js
its a useless package
just use what bun gives you
thats what I love about bun
it has so many things built into it
to where u dont need a external package
just make sure you do bun install -d @types/bun
if its not there already
it also lets you pick
argon2 is reccomanded
but it comes with bun so you dont need a package
Morelet’s CrocodileOP
oki
thank you
for some reason all the user things went red
i dont remember deleting anything so idk why
hold on
im gonna try to look at all this again
i swear everything looks the same
Morelet’s CrocodileOP
nvm
i was missing an argument
Palomino
@Morelet’s Crocodile please mark this one as solved please
Morelet’s CrocodileOP
oh!
okay
how do i do that
😓
i only know how to close it
i dont have it?
omgom
ok
wait oops
i didnt read
nope its still not appearing
😭