first time installing next js..
Unanswered
Morelet’s Crocodile posted this in #help-forum
Morelet’s CrocodileOP
hi im on the nextjs website and following a yt tutorial but im kind of confused where they open anything to start installing nextjs on windows so can someone help direct me please :']
253 Replies
@Morelet’s Crocodile hi im on the nextjs website and following a yt tutorial but im kind of confused where they open anything to start installing nextjs on windows so can someone help direct me please :']
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