Next.js Discord

Discord Forum

Error: ENOENT: no such file or directory , stat 'C:/components.json' (shadcn-ui)

Unanswered
lushna posted this in #help-forum
Open in Discord
I am getting this error:

"Error: ENOENT: no such file or directory, stat 'C:/components.json' ./app/globals.css.webpack[javascript/auto]!=!./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[11].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[11].oneOf[12].use[3]!./app/globals.css
./app/globals.css"

when I am trying to run my next.js project.

The "components.json" file is the file that is generated by the shadcn-ui installation in order to use their components. It complains about the path here or the globals.css file in the app directory. My whole project is not in the "C:" folder its in "C:/Users/<username>/OneDrive/Desktop/<foldername>/project" .
Tried deleting the .next folder, node_modules and adding them back, nothing worked.
Same question is asked on stackoverflow also : https://stackoverflow.com/questions/78211594/error-in-next-js-shadcn-ui-on-running-npm-run-dev-error-enoent-no-such-file with the dependencies given too.

0 Replies