Code Monkey home page Code Monkey logo

Comments (5)

cadecannon avatar cadecannon commented on September 27, 2024 1

Does not appear to work for me. I'm now getting the following error:

(0 , AuditMixin_1.auditCustom) is not a function

I am running 5.9.0 of adonis/core and 3.1.1 of adonis5-audit.

When I import this:

import { Audit, auditCustom } from '@ioc:Adonis/Addons/AuditMixin'

Audit exists but auditCustom does not.

from adonis5-audit.

vinicioslc avatar vinicioslc commented on September 27, 2024

Hi sorry for the mismatch documentation try something like this below and write here if works properly
import { auditCustom } from '@ioc:Adonis/Addons/AuditMixin'

on my project its working

    await auditCustom({
      event: CustomAuditEvents.manifestEvent,
      data: { custom: 'data' },
      auditable: 'VehicleType',
      auditable_id: vehicleType.id,
      ctx: ctx,
    })

from adonis5-audit.

vinicioslc avatar vinicioslc commented on September 27, 2024

Your tsconfig.json have the following typo notations inside import and include keys?

{
  "extends": "./node_modules/adonis-preset-ts/tsconfig",
  "exclude": [
    "node_modules",
    "build"
  ],
  "compilerOptions": {
    "strict": false,
    "forceConsistentCasingInFileNames": true,
    "experimentalDecorators": true,
    "resolveJsonModule": true,
    "outDir": "build",
    "alwaysStrict": true,
    "rootDir": "./",
    "target": "ESNext",
    "sourceMap": true,
    "paths": {
      "App/*": [
        "./app/*"
      ],
      "Config/*": [
        "./config/*"
      ],
      "Contracts/*": [
        "./contracts/*"
      ],
      "Services/*": [
        "./Services/*"
      ],
      "Database/*": [
        "./database/*"
      ]
    },
    "types": [
      "@adonisjs/core",
      "@adonisjs/repl",
      "@adonisjs/auth",
      "@adonisjs/lucid",
      "@adonisjs/shield",
      "@adonisjs/bouncer",
      "adonis5-audit",
    ]
  },
  "include": [
    "adonis5-audit"
  ]
}

If has it and stays in the problem, please create an empty repo, with the same problem for me to reproduce this behavior.

in my project its working nice with adonisjs/[email protected] and [email protected]

from adonis5-audit.

vinicioslc avatar vinicioslc commented on September 27, 2024

It would be great if you create a repository to reproduce this problem and make sure it's not some configuration in your environment, so if it's a missing configuration, let us know so we can improve the documentation and add the missing steps. @cadecannon

from adonis5-audit.

vinicioslc avatar vinicioslc commented on September 27, 2024

This issued will be closed due the lack of innactivity

from adonis5-audit.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.