Error: Cannot Find Module '@Adminjs/Design-System'

Error: Cannot Find Module '@Adminjs/Design-System'

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");

2

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:

  1. You have the admin user right to install things on your machine.

  2. You have installed one of Express, Hapi and Koajs. If not,

    npm install express express-formidable
    
  3. You have installed AdminJS. If not,

    npm install adminjs @adminjs/express
    
  4. Finally, install according to the official doc:

    npm install styled-components @adminjs/design-system
    
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Alexander Ross
Author

Alexander Ross

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.