{"ArticleId":null,"Name":"The admin panel has no styles or scripts","Content":"\n\u003Cp\u003ESymptom: the admin panel (or the store owner or vendor panel) opens as plain, unstyled HTML; menus do not work; the browser\u0027s developer tools show 404 errors for files under \u003Ccode\u003E/_content/...\u003C/code\u003E. The storefront may look fine at the same time.\u003C/p\u003E\n\n\u003Ch2 id=\u0022cause\u0022\u003EThe usual cause\u003C/h2\u003E\n\u003Cp\u003EThe panels\u0027 styles and scripts are packaged as static web assets of a separate library. When you \u003Cstrong\u003Erun the build output directly\u003C/strong\u003E (for example \u003Ccode\u003Edotnet bin/Debug/.../Grand.Web.dll\u003C/code\u003E), ASP.NET Core finds those files only through a development manifest, which it reads only when \u003Ccode\u003EASPNETCORE_ENVIRONMENT\u003C/code\u003E is \u003Ccode\u003EDevelopment\u003C/code\u003E. Without it, every \u003Ccode\u003E/_content/...\u003C/code\u003E request returns 404.\u003C/p\u003E\n\n\u003Ch2 id=\u0022fix\u0022\u003EFix\u003C/h2\u003E\n\u003Cul\u003E\n\u003Cli\u003E\u003Cstrong\u003EDevelopment machine\u003C/strong\u003E: set \u003Ccode\u003EASPNETCORE_ENVIRONMENT=Development\u003C/code\u003E before starting, or run from Visual Studio / \u003Ccode\u003Edotnet run\u003C/code\u003E, which set it for you.\u003C/li\u003E\n\u003Cli\u003E\u003Cstrong\u003EProduction\u003C/strong\u003E: deploy the output of \u003Ccode\u003Edotnet publish\u003C/code\u003E (or the Docker image), not the build folder. Publishing copies the static assets next to the application, and the environment can stay \u003Ccode\u003EProduction\u003C/code\u003E.\u003C/li\u003E\n\u003Cli\u003EAfter fixing, reload with the cache bypassed (Ctrl\u002BF5): the browser may have cached the 404 responses.\u003C/li\u003E\n\u003C/ul\u003E\n\n\u003Ch2 id=\u0022other-causes\u0022\u003EOther causes\u003C/h2\u003E\n\u003Cul\u003E\n\u003Cli\u003EA reverse proxy or CDN that blocks or rewrites paths starting with \u003Ccode\u003E/_content\u003C/code\u003E.\u003C/li\u003E\n\u003Cli\u003EA custom \u003Ccode\u003EApplication:StaticFilesCacheControl\u003C/code\u003E or security headers that break loading; check the browser console.\u003C/li\u003E\n\u003Cli\u003EBrowser extensions that block scripts on the admin domain.\u003C/li\u003E\n\u003C/ul\u003E\n\n\u003Ch2 id=\u0022related\u0022\u003ERelated\u003C/h2\u003E\n\u003Cul\u003E\n\u003Cli\u003E\u003Ca href=\u0022/getting-started-installing\u0022\u003EInstalling GrandNode\u003C/a\u003E\u003C/li\u003E\n\u003Cli\u003E\u003Ca href=\u0022/system-appsettings\u0022\u003EApplication settings (appsettings.json)\u003C/a\u003E\u003C/li\u003E\n\u003C/ul\u003E\n","ParentCategoryId":"6abe3a3b04b9d0a2009fec01","SeName":"troubleshooting-admin-unstyled","MetaKeywords":null,"MetaDescription":"Why the GrandNode admin, store or vendor panel loads without CSS and JavaScript, and how to fix it: environment, publish output, proxies and caching.","MetaTitle":null,"AllowComments":false,"Captcha":{"ReCaptchaChallengeField":null,"ReCaptchaResponseField":null,"ReCaptchaResponseValue":null,"ReCaptchaResponse":null},"RelatedArticles":[],"CategoryBreadcrumb":[{"Name":"Troubleshooting and FAQ","Description":null,"IsCurrent":false,"Children":null,"Parent":null,"SeName":"docs-troubleshooting","Id":"6abe3a3b04b9d0a2009fec01","UserFields":[]}],"AddNewComment":{"CommentText":null,"DisplayCaptcha":false,"Id":null,"UserFields":[]},"Comments":[],"Id":"6abe3a3b04b9d0a2009fec07","UserFields":[]}