Next.js Discord

Discord Forum

How do i run a nextjs app

Unanswered
Black Turnstone posted this in #help-forum
Open in Discord
Black TurnstoneOP
right now i have a fully functional next.js app connexted to mongodb and tailswindcss. I am not a dev but i want to run that app o my computer. So I put the file into my VS code and did npm run start, it didnt recognize it. Then i did, npx create-next-app@latest , gave me 1000 line errors lol

124 Replies

Black TurnstoneOP
i am not a dev so i really dont know anything
Yellow and black potter wasp
first use npm i to install dependencies then npm run dev to run it in dev mode
@Yellow and black potter wasp first use npm i to install dependencies then npm run dev to run it in dev mode
Black TurnstoneOP
bro it been like that
ever since you told me
does it take that long
been 2 hours
Netherland Dwarf
@Black Turnstone how did you set up the project
It shouldnt take that long
Next.js is really quick for development
Its one reason why devs use it a lot its meant for the best dev experience
American Crocodile
As a senior Next.js developer, I can help you.
Even, I can help u to implement some functions you want.
So what is your goal of your Next app?
West African Lion
Are you using ipv6? I've run into something similar and IIRC I fixed it by forcing IPV4. Im sure if you google around you'll find a few github issues
@Black Turnstone bro it been like that
Yellow and black potter wasp
Sometimes that happens just press ctrl+c and try again
@Netherland Dwarf <@737438130004689036> how did you set up the project
Black TurnstoneOP
iits already set up
like i have the source code
but i want to put it on my vs code studio
@Yellow and black potter wasp Sometimes that happens just press ctrl+c and try again
Black TurnstoneOP
this happeend
after all that waiting
it gave me this error
Brown bear
@Black Turnstone
- Delete the node_modules directory and the package-lock.json file (if it exists)
- Clear the npm cache:
npm cache clean --force

- Npm install again:
npm install
Brown bear
it's a permission issue
Are you using several user in your system?
@Brown bear Are you using several user in your system?
Black TurnstoneOP
idk
i really dont know anything about pc
i tried this
you need to copy the "/Users/..." part too
@joulev you need to copy the "/Users/..." part too
Black TurnstoneOP
sorry?
wdym
you need to run
sudo chown -R 502:20 "/Users/abdulrahmanahmad/.npm"

not just
sudo chown -R 502:20
Black TurnstoneOP
thanks
i used then npm i
@joulev you need to run sudo chown -R 502:20 "/Users/abdulrahmanahmad/.npm" not just sudo chown -R 502:20
Black TurnstoneOP
do you know why
i then used npm i
@Black Turnstone do you know why
no idea, your nodejs installation seems to be corrupted
@joulev no idea, your nodejs installation seems to be corrupted
Black TurnstoneOP
what do i do
to fix that
is there a way to dekete it
then reinstall
Brown bear
Delete the node_modules directory and the package-lock.json file (if it exists)

Did you delete?
and retry?
Black TurnstoneOP
i dont know how to do that
can u tell me what to use
Brown bear
rm -rf /Volumes/ABOODA\ DISK/Bloxtime/Source\ Edited\ by\ me/file/node_modules
rm /Volumes/ABOODA\ DISK/Bloxtime/Source\ Edited\ by\ me/file/package-lock.json
and npm install again
I highly recommend reinstalling nodejs
@Brown bear rm -rf /Volumes/ABOODA\ DISK/Bloxtime/Source\ Edited\ by\ me/file/node_modules
Black TurnstoneOP
this didnt do anything
not even a blue circle
@Anay-208 I highly recommend reinstalling nodejs
Black TurnstoneOP
so i install it again?
didnt do anything
Yup
@Anay-208 Yup
Black TurnstoneOP
can u tell me the command cuz i forgot?
😅
@Black Turnstone can u tell me the command cuz i forgot?
Uninstall then install using nvm
Black TurnstoneOP
i dont know the commands
how do i install and uninstall
@Brown bear rm -rf /Volumes/ABOODA\ DISK/Bloxtime/Source\ Edited\ by\ me/file/node_modules
Black TurnstoneOP
i searched on google
it says to use this
but this didnt do anythig
it doesnt show a blue circle
Brown bear
rm -rf node_modules
Black TurnstoneOP
this worked
what do i do now
@Brown bear rm -rf node_modules
Brown bear
Is this work?
@Black Turnstone this worked
Black TurnstoneOP
this one did
what do i do
after that
Brown bear
rm package-lock.json
Black TurnstoneOP
worked
Brown bear
and try again
npm install
Black TurnstoneOP
Brown bear
oops
ls -l
and show me the screenshot
Black TurnstoneOP
@Brown bear ls -l
Black TurnstoneOP
i think i messed something up when i used npm install create-next-app
i think i am the one who created this
even tho the app was already working and done
Black TurnstoneOP
@Brown bear am sorry for pingging but can you pls tell me what to do next?
umm
Can I know if you uninstalled?
@Anay-208 Can I know if you uninstalled?
Black TurnstoneOP
i did
@Black Turnstone this worked
Black TurnstoneOP
here
Then reinstall using nvm
Black TurnstoneOP
can u tell me what command to use
@Black Turnstone Click to see attachment
Black TurnstoneOP
@Brown bear told me to use this
Brown bear
did you run
npm install create-next-app
in file directory?
Black TurnstoneOP
yes
Brown bear
Do you have backup project?
@Brown bear Do you have backup project?
Black TurnstoneOP
like an untouched one
yes
like i can redownload the code again
Brown bear
that's great
and do not npm install create-next-app
after download, check readme file
@Brown bear after download, check readme file
Black TurnstoneOP
so i redownload it again
and then npm i?
Brown bear
yes
@Brown bear yes
Black TurnstoneOP
can you tell me what to use after npm i?
npm run dev?
Brown bear
Sure
Black TurnstoneOP
k hopefully it works
still working
@Brown bear Sure
Black TurnstoneOP
man 😭
Brown bear
😟
Please share readme.md file
also package.json
@Brown bear Please share readme.md file
Black TurnstoneOP
how
Brown bear
can't you share in here?
Black TurnstoneOP
its empty
@Brown bear also package.json
Brown bear
?
@Brown bear ?
Black TurnstoneOP
oh sorry
i didnt see it
can i send it in dms ? @Brown bear
Brown bear
No problem
Netherland Dwarf
I actually was going to say you should use nvm
Instead of npm