Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@admin-bro/nestjs can't find @admin-bro/express on node:14.17-alpine #23

Open
DiMatteoL opened this issue Jul 3, 2021 · 7 comments
Open

Comments

@DiMatteoL
Copy link

Hi !

I'm running a nestjs app (with adminBro) on a docker container node:14.17-alpine.

And I get this error:
The "@admin-bro/express" package is missing. Please, make sure to install this library ($ npm install @admin-bro/express) to take advantage of @admin-bro/nestjs

But my package.json does have both of those libraries:

"@admin-bro/express": "^3.1.0",
"@admin-bro/nestjs": "^1.1.0",

Is there a version requirement I missed ?

@DiMatteoL
Copy link
Author

I have the exact same error when switching to adminjs:

    "@adminjs/express": "^4.0.0",
    "@adminjs/nestjs": "^2.0.0",
    "@adminjs/typeorm": "^2.0.0",
    "adminjs": "^5.0.1",
The "@adminjs/express" package is missing. Please, make sure to install this library ($ npm install @adminjs/express) to take advantage of @adminjs/nestjs

And yes I have checked, I do have the @adminjs/express package properly installed on my docker image.

@joaovitoras
Copy link

express-session is required for @adminjs/express
require out of nest to reproduce and find the issue

# node
Welcome to Node.js v14.17.0.
Type ".help" for more information.
> require('@adminjs/express')
Uncaught Error: Cannot find module 'express-session'
Require stack:
- /app/node_modules/@adminjs/express/lib/buildAuthenticatedRouter.js
- /app/node_modules/@adminjs/express/lib/index.js
- <repl>
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/app/node_modules/@adminjs/express/lib/buildAuthenticatedRouter.js',
    '/app/node_modules/@adminjs/express/lib/index.js',
    '<repl>'
  ]
}

Documentation says it's optional, but the code doesn't behave that way

@ruzz311
Copy link

ruzz311 commented Jul 16, 2021

Wow... ok same for express-formidable too I guess (after checking in the repl). Thanks!

@kavyantic
Copy link

Facing the same issue for '@adminjs/nestjs' package. Nodejs says "Cannot find module '@adminjs/nestjs' or its corresponding type declarations.ts(2307)". I have properly checked in package.json and node_modules, it has been properly installed.

@mujehoxe
Copy link

mujehoxe commented Sep 7, 2023

Facing the same issue for '@adminjs/nestjs' package. Nodejs says "Cannot find module '@adminjs/nestjs' or its corresponding type declarations.ts(2307)". I have properly checked in package.json and node_modules, it has been properly installed.

did you find any solutions?

@niraj-khatiwada
Copy link

For anyone having the same issue in Nest.js, make sure to install express-session and express-formidable.

@kavyantic
Copy link

Facing the same issue for '@adminjs/nestjs' package. Nodejs says "Cannot find module '@adminjs/nestjs' or its corresponding type declarations.ts(2307)". I have properly checked in package.json and node_modules, it has been properly installed.

did you find any solutions?

No, I stopped using it with nestjs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants