Hitl create notification is not working

Hitl alert agent(create notification is not working), I’m following your official document to pause a flow and send notification to agent.
getting error cannot read property ‘create’ of undefined.
I’m using botpress 12.22.0 version.
my code snippet is like this.

escalate = async() => {
  const { botId } = event;
    bp.notifications.create(event.botId, {
      botId: event.botId,
      message: 'A human wants to connect with bot.',
      level: 'info',
      redirectUrl: '/modules/hitl'
    })
  const axiosConfig = await bp.http.getAxiosConfigForBot(event.botId, { localUrl: true })
  await axios.post(
    `/mod/hitl/channel/${event.channel}/user/${event.target}/pause`, {},
    axiosConfig
  )
}
return escalate()
  • Where did you put your code sample (hooks or action) ?
  • Do you have the stack trace of this error ? I will be easier to check where is the problem.

Put the code sample in action.

STACK TRACE:
07/13/2021 17:39:49.652 ActionService An error occurred while executing the action "hitl/hitlagenthandoff [TypeError, Cannot read property 'create' of undefined]                                                                                                           erty 'create' of undefined]
STACK TRACE
TypeError: Cannot read property 'create' of undefined
    at escalate (eval at _runWithoutVm (C:\Users\Administrator\botpress\out\bp\core\user-code\action-service.js:380:55), <anonymous>:24:22)22)
    at eval (eval at _runWithoutVm (C:\Users\Administrator\botpress\out\bp\core\user-code\action-service.js:380:55), <anonymous>:38:8)
    at ScopedActionService._runWithoutVm (C:\Users\Administrator\botpress\out\bp\core\user-code\action-service.js:381:16)
    at ScopedActionService.runLocalAction (C:\Users\Administrator\botpress\out\bp\core\user-code\action-service.js:262:29)
    at async ScopedActionService.runAction (C:\Users\Administrator\botpress\out\bp\core\user-code\action-service.js:148:17)
    at async ActionStrategy.invokeAction (C:\Users\Administrator\botpress\out\bp\core\dialog\instruction\strategy.js:134:13)
    at async DialogEngine.processEvent (C:\Users\Administrator\botpress\out\bp\core\dialog\dialog-engine.js:88:28)
    at async DecisionEngine.processEvent (C:\Users\Administrator\botpress\out\bp\core\dialog\decision-engine.js:131:40)
    at async EventEngine.eventEngine.onAfterIncomingMiddleware (C:\Users\Administrator\botpress\out\bp\core\app\botpress.js:333:13)
    at async C:\Users\Administrator\botpress\out\bp\core\events\event-engine.js:132:48