Next.js Discord

Discord Forum

Getting this error after adding shadcn-ui separator

Unanswered
JCo posted this in #help-forum
Open in Discord
JCoOP
Does anyone know how I can resolve this issue? Is it an issue with react or shadcn?

67 Replies

Please share with us whole build logs, as you posted only a part of them.
JCoOP
ty
JCoOP
For reference thats a brand new install of the create-next-app in a new folder on a new app using 14.0.4
As I see, there is a problem with modules naming, is your repository public?
JCoOP
this isnt even pushed to a repo
This is legit just the bare bones template from create-next-app
ok, would be brilliant if you will do so, that would be much easier to debug such error locally.
JCoOP
will do
If you don't want to publish your current code, please prepare minimal reproduction repository

https://nextjs-faq.com/minimal-reproduction-repository
no i legit have done 0 work on this...
I deleted everything I had and did a fresh install
complete clean of everything.
give me a few seconds to dive into it 😄
JCoOP
You will legit see its just the template from when you first create the next app lol
I can't reproduce this error
JCoOP
how tf am I getting this error then...
its a clean repo
huh
disable next dev
remove .next dir
start again and check
I bet it's issue with cache that lasted in your filesystem
JCoOP
and node modules or nah?
why not
but remember to install them again 😄
JCoOP
obviously.
└─$ next build
   â–² Next.js 14.0.4

 ✓ Creating an optimized production build    
 ✓ Compiled successfully
 ✓ Linting and checking validity of types    
 ✓ Collecting page data    
 ✓ Generating static pages (5/5) 
 ✓ Collecting build traces    
 ✓ Finalizing page optimization    

Route (app)                              Size     First Load JS
┌ ○ /                                    5.13 kB          87 kB
â”” â—‹ /_not-found                          875 B          82.7 kB
+ First Load JS shared by all            81.8 kB
  ├ chunks/938-5e061ba0d46125b1.js       26.7 kB
  ├ chunks/fd9d1056-735d320b4b8745cb.js  53.3 kB
  ├ chunks/main-app-708542f23a9fe59d.js  220 B
  â”” chunks/webpack-327c219bf3d3ad2c.js   1.65 kB


â—‹  (Static)  prerendered as static content
JCoOP
if this doesnt work I might start deving on a remote server... just to see lol
it even builded without any errors
JCoOP
weird
happens, in most cases removing .next helps
JCoOP
im going back to pnpm for it, because that had less issues and was faster...
@Z4NR34L happens, in most cases removing `.next` helps
JCoOP
you would think given its a new folder on a new drive and I did nothing except install the next app i wouldnt have this issue
pretty much, I had just cloned the repo and started dev/build
Something to do with globally isntalled moduels maybe?
pnpm list -g
npm list -g
JCoOP
hmmm nothing suspicious
JCoOP
yup just stuff for making ai chatbots on azure lol
thats sketchy af... but shouldnt conflict.
try with clean clone of that repo
JCoOP
the repo was empty until you told me to push
it had no remote set locally, nothing.
git clone [...]
cd [...]
npm install
next dev
ok
just clone it anywhere on your pc
JCoOP
i just made a fresh folder and created a next app, this error is happening out of the box.
└─$ next dev                            
   â–² Next.js 14.0.4
   - Local:        http://localhost:3000

 ✓ Ready in 3.3s
 â—‹ Compiling / ...
 ✓ Compiled / in 1906ms (500 modules)
 ✓ Compiled in 134ms (235 modules)
 ✓ Compiled /favicon.ico in 176ms (505 modules)
so far I'am not able to reproduce that on clean cloned repository that you provieded haha
JCoOP
I didnt do rm -rf on it this time...
I used file shredder from bitdefender...
and finally... it built without error on pnpm...
i think im going to risk the install of shadcn now.
keep going, if you will get into trouble, just push to repo and ping me here 😉
JCoOP
bet
Still trying to figure out how a clean install on a drive i dont use for anything but next dev got this error.
Just try with this anywhere on your PC

git clone https://gitlab.com/JCoDog/jconet-donate.git jconet-donate-reprod
cd jconet-donate-reprod
npm install
next dev
and open local env to check if that issues still persists
JCoOP
@Z4NR34L can you check for me, but my items-center and justify-center aren't working on the tip and subscribe page... even with the height set to full.
just pushed to the repo