I was working with:
https://github.com/TailAdmin/tailadmin-free-tailwind-dashboard-template
so a free template with NextJS template. When i download it and run it works just fine. I reorganize the files- just move the files into different folder and refactor. After moving files, i get:
Error: Invalid declaration: `U as UserConfig, P as Plugin`
./app/dashboard/globals.css.webpack[javascript/auto]!=!./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[3]!./app/dashboard/globals.css
Error: Invalid declaration:
U as UserConfig, P as Plugin
at async Promise.all (index 0)
Heres the folder structure:
Directory: C:\Users\user\Desktop\client-test\dashboard\client
Mode LastWriteTime Length Name
d----- 6/12/2025 10:46 AM .idea d----- 6/12/2025 10:47 AM .next d----- 6/12/2025 10:46 AM app d----- 6/12/2025 10:45 AM assets d----- 6/12/2025 10:44 AM components d----- 6/12/2025 10:47 AM node_modules
d----- 6/12/2025 10:41 AM public d----- 6/12/2025 10:45 AM shared -a---- 6/12/2025 9:56 AM 43 .eslintrc.json -a---- 6/12/2025 9:56 AM 435 .gitignore -a---- 6/12/2025 9:56 AM 1430718 banner.png
-a---- 6/12/2025 9:56 AM 409 eslint.config.mjs -a---- 6/12/2025 9:56 AM 97 jsvectormap.d.ts -a---- 6/12/2025 9:56 AM 1087 LICENSE -a---- 6/12/2025 10:42 AM 216 next-env.d.ts -a---- 6/12/2025 9:56 AM 282 next.config.ts -a---- 6/12/2025 10:47 AM 330777 package-lock.json -a---- 6/12/2025 9:56 AM 1680 package.json -a---- 6/12/2025 9:56 AM 77 postcss.config.js -a---- 6/12/2025 9:56 AM 68 prettier.config.js -a---- 6/12/2025 9:56 AM 6480 README.md -a---- 6/12/2025 9:56 AM 241 svg.d.ts
-a---- 6/12/2025 9:56 AM 629 tsconfig.json
Deleting the cache:
Remove-Item -Recurse -Force .next, node_modules, package-lock.json
Doesnt fix the error.
The error is after moving the files! I didnt change anything in any files. Why i get this error? How to fix it?