updateRule not working

Open
#300 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript
Domain
backend

Research direction

Start by reproducing the failure at examples/sandbox.js:86 and inspect the engine API involved in the updateRule call. Trace the related execution path through examples/node_modules/json-rules-engine/dist/rule.js and confirm whether the example uses a supported method; done means the example no longer raises the TypeError or the issue clearly documents the unsupported call.

Written by the indexing model from the issue text.

Description

engine.updateRule(rule)
^

TypeError: engine.updateRule is not a function
at Rule. (/home/ashwin/sandbox/json-rules-engine/examples/sandbox.js:86:16)
at Rule.EventEmitter.emitAsync (/home/ashwin/sandbox/json-rules-engine/examples/node_modules/eventemitter2/lib/eventemitter2.js:1133:31)
at processResult (/home/ashwin/sandbox/json-rules-engine/examples/node_modules/json-rules-engine/dist/rule.js:339:23)
at /home/ashwin/sandbox/json-rules-engine/examples/node_modules/json-rules-engine/dist/rule.js:350:18
at async Promise.all (index 0)

Dominant language
JavaScript
Stars
3.1k
Forks
507
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CacheControl/json-rules-engine

All issues in CacheControl/json-rules-engine

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.