SoftwareBrothers / adminjs

AdminJS is an admin panel for apps written in node.js
https://adminjs.co
MIT License
8.23k stars 664 forks source link

[Bug]: Can't package Nestjs Application with serverless for AWS lambda function deployment due to issue with adminjs. #1480

Open austin047 opened 1 year ago

austin047 commented 1 year ago

Contact Details

Admin JS slack Channel

What happened?

I am trying to deploy a nest js project with the serverless framework to AWS.

While doing so, this error prevented the project from being bundled.

Bug prevalence

When packing the project for deployment

AdminJS dependencies version

^6.8.7"

What browsers do you see the problem on?

No response

Relevant log output

Error:
Error: Parsing file /Users/austin/code/payme/payme-backend/node_modules/adminjs/lib/adminjs.js: visitor[(override || node.type)] is not a function
    at Deps.parseDeps (/Users/austin/code/payme/payme-backend/node_modules/module-deps/index.js:519:15)
    at getDeps (/Users/austin/code/payme/payme-backend/node_modules/module-deps/index.js:447:44)
    at /Users/austin/code/payme/payme-backend/node_modules/module-deps/index.js:430:38
    at ConcatStream.<anonymous> (/Users/austin/code/payme/payme-backend/node_modules/concat-stream/index.js:37:43)
    at ConcatStream.emit (events.js:412:35)
    at ConcatStream.emit (domain.js:475:12)
    at finishMaybe (/Users/austin/code/payme/payme-backend/node_modules/readable-stream/lib/_stream_writable.js:630:14)
    at endWritable (/Users/austin/code/payme/payme-backend/node_modules/readable-stream/lib/_stream_writable.js:638:3)
    at ConcatStream.Writable.end (/Users/austin/code/payme/payme-backend/node_modules/readable-stream/lib/_stream_writable.js:594:22)
    at DuplexWrapper.onend (/Users/austin/code/payme/payme-backend/node_modules/readable-stream/lib/_stream_readable.js:577:10)
    at Object.onceWrapper (events.js:519:28)
    at DuplexWrapper.emit (events.js:412:35)
    at DuplexWrapper.emit (domain.js:475:12)
    at endReadableNT (/Users/austin/code/payme/payme-backend/node_modules/readable-stream/lib/_stream_readable.js:1010:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)

### Relevant code that's giving you issues

```TypeScript
Command Ran: `sls package`

My tsconfig.json file 

{
  "compilerOptions": {
    "module": "commonjs",
    "declaration": true,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "allowSyntheticDefaultImports": true,
    "target": "es2017",
    "sourceMap": true,
    "outDir": "./dist",
    "baseUrl": "./",
    "incremental": true,
    "skipLibCheck": true,
    "strictNullChecks": false,
    "noImplicitAny": false,
    "strictBindCallApply": false,
    "forceConsistentCasingInFileNames": false,
    "noFallthroughCasesInSwitch": false,
    "esModuleInterop": true,
    // "tsBuildInfoFile": ".tsbuildinfo"
  }

}

Node v14.20.0 (npm v6.14.17)