Tailwind Ui Template next js error
Answered
Velvet ant posted this in #help-forum
Velvet antOP
I used this tailwind ui template https://tailwindui.com/templates/spotlight and when trying to view it in my browser from the code editor, i get an error saying there is no pages or app directory?
47 Replies
Velvet antOP
@Ray could you show the folder structure?
Velvet antOP
is this what you were looking for?
@Ray yes run `ls`
Velvet antOP
@Velvet ant Click to see attachment
cd sportlight-jsAnswer
npm run dev
@Ray `cd sportlight-js`
Velvet antOP
keeps giving errors lol
@Velvet ant keeps giving errors lol
did you run
npm install?@Ray did you run `npm install`?
Velvet antOP
yea
try to run again
Velvet antOP
ok
@Ray try to run again
Velvet antOP
try
npm i --force@Ray try `npm i --force`
Velvet antOP
same error again
@Velvet ant same error again
what is your node version?
Velvet antOP
v20.11.0
@Velvet ant v20.11.0
run
ls againVelvet antOP
@Velvet ant Click to see attachment
try to delete
package-lock.json and run npm i --force againsame error again ðŸ˜
@Velvet ant Click to see attachment
run
npm install@Ray run `npm install`
Velvet antOP
same thing
@Velvet ant same thing
could you show the error
@Ray could you show the error
Velvet antOP
@Velvet ant Click to see attachment
npx next infoVelvet antOP
@Velvet ant Click to see attachment
try
npm install --save next@latest --include=optional@Velvet ant Click to see attachment
first time creating nextjs on this device?
@Ray first time creating nextjs on this device?
Velvet antOP
yea i just bought it yesterday night
didnt have these issues on my last macbook
@Velvet ant yea i just bought it yesterday night
try
npx create-next-app@latest on other folderVelvet antOP
what other folder
different directory
cd ..
Velvet antOP
@Velvet ant Click to see attachment
can you run it?
Velvet antOP
yea it works on the local host
ive only had issues using the tailwind ui templates
@Velvet ant yea it works on the local host
ok go back to the template folder and run
rm -rf node_modules && rm -rf .next && rm -rf package-lock.json then npm installVelvet antOP
cd spotlight-jsVelvet antOP
@Velvet ant Click to see attachment
npm install @mapbox/rehype-prism@Ray `npm install @mapbox/rehype-prism`
Velvet antOP
thank you bro