sourcefuse / loopback4-microservice-catalog

A Catalog of Microservices Created by SourceFuse for the Community
https://sourcefuse.github.io/arc-docs/arc-api-docs/
MIT License
292 stars 70 forks source link

Audit log throws unexpected error on start of the service #2088

Closed akshatdubeysf closed 3 months ago

akshatdubeysf commented 4 months ago

Describe the bug Any service using the ARC Audit Service fails at start with the following error when using it after docker prune -

Starting newrelic agent
60
node:internal/modules/cjs/loader:1143
59
  throw err;
58
  ^
57
56
Error: Cannot find module './doc/workbook'
55
Require stack:
54
- /home/node/app/node_modules/exceljs/lib/exceljs.nodejs.js
53
- /home/node/app/node_modules/exceljs/excel.js
52
- /home/node/app/node_modules/@sourceloop/audit-service/dist/services/audit-log-export.service.js
51

To Reproduce Steps to reproduce the behavior:

  1. install the latest ARC Audit Service
  2. bind it's component in any Loopback application
  3. Run node-prune
  4. Start the service
  5. See error

Expected behavior The service should start without any error

Additional context The issue seems to be because of node-prune removing docs named folders from node_modules, and excejs used by the latest audit service seems to be dependent on it