I installed AdminJS and was trying to run my application but I am coming across this Error
It says: Error: Cannot find module '@adminjs/design-system'
Even though design-system exists and I even added it as a require statement
const AdminJSDesignSystem = require("./@adminjs/design-system");
I also tried installing it again but it gave a huge error Right here
Please help me fix this. I have got here after being through so many errors and fixing them and even now these errors won't stop popping up.
3 Answers
looks like you are importing it using a relative path.
You should change that to just the package name
e.g. const AdminJSDesignSystem = require("@adminjs/design-system");
You need to do something like this:
const AdminJSDesignSystem = require("@adminjs/design-system");
Make sure you have followed the official guide of AdminJS and adminjs/design-system that:
You have the admin user right to install things on your machine.
You have installed one of
Express,HapiandKoajs. If not,npm install express express-formidableYou have installed AdminJS. If not,
npm install adminjs @adminjs/expressFinally, install according to the official doc:
npm install styled-components @adminjs/design-system