Closed mattrochon closed 10 months ago
components.bundle.js
appears in your browser's Network tab and if there're any contents?'g:\\workspace\\REDACTED\\view\\MainDashboard''
(to make sure the resolved path is correct)? You can try to use path.join
to provide an absolute path in case it works incorrectly with relative path.Try adding:
if (process.env.NODE_ENV === 'production') await admin.initialize();
else admin.watch();
after const admin = new AdminJS(adminOptions);
Solved it! Thanks so much
What happened?
Followed the documentation to setup a custom dashboard:
MainDashboard.tsx
ComponentConfig.ts
Application.ts
Log output:
It all seems to be setup correctly but all i see if the default dashboard.
Bug prevalence
Always
AdminJS dependencies version
"dependencies": { "@adminjs/express": "^6.1.0", "@adminjs/prisma": "^5.0.1", "@adminjs/themes": "^1.0.1", "@types/express": "^4.17.21", "adminjs": "^7.4.2", "express": "^4.18.2", "express-formidable": "^1.2.0", "express-session": "^1.17.3", "nodemon": "^3.0.2", "prisma": "^5.6.0", "tslib": "^2.6.2" }, "devDependencies": { "tsx": "^4.6.2" },
What browsers do you see the problem on?
No response
Relevant log output
Relevant code that's giving you issues