jouke / loopback-auditz

Adds comprehensive audit trail functionality to Loopback by keeping track of who created/modified/deleted data and when they did it, and adds a revisions model compatible with Sofa/Revisionable for PHP (https://github.com/jarektkaczyk/revisionable)
Other
19 stars 12 forks source link

UNMET PEER DEPENDENCY when npm install, need support of remote-cdx 0.3.0 #5

Open johncpang opened 7 years ago

johncpang commented 7 years ago

I followed the instruction and run nom install --save loopback-component-remote-ctx loopback-auditz and got this warning:

├── loopback-auditz@0.5.0 
└── UNMET PEER DEPENDENCY loopback-component-remote-ctx@0.3.0

npm WARN loopback-auditz@0.5.0 requires a peer of loopback-component-remote-ctx@^0.2.2 but none was installed.`

Tried to install each of them separately but not still got the warning. If I run nom install loopback-component-remote-ctx@0.2.2, I got:

└── loopback-component-remote-ctx@0.2.2  invalid

Any suggestion? Thanks.

led1234 commented 7 years ago

I have the same problem. Please, let me know if you have found a solution!

Thank you!

johncpang commented 7 years ago

No. I just ignore the warning.

But having remote ctx seems breaking some functions. I need to black list several methods in "member" (an extended model from "User") but not the whole model, as I have some related remote method which take advantage of the remote ctx (able to get the POST body in observe('after save',...)

I'm considering write my own mixin to replicate the features but without remote-ctx.

led1234 commented 7 years ago

Thank you for the answer!

I can't even use loopback with the described settings. I obtain this error:

Cannot load the LoopBack application: Cannot read property 'createModel' of undefined

Have you seen it?

Thank you!

johncpang commented 7 years ago

With remote-ctx, your ctx and other arguments are changed. Need to check before use. I use console.log(ctx) and look for the changes.

bariscicek commented 7 years ago

just install loopback-component-remote-ctx@0.2 so

npm install --save loopback-component-remote-ctx@0.2

Though loopback-auditz should change package.json to @^0.3 if it does not break.