Error node Xmpp Daemon Cannot find module 'async'

When put fwconsole start show this error.

[[email protected] ~]# fwconsole start
Asterisk already running
Running FreePBX startup…
Taking too long? Customize the chown command,
Setting Permissions…
Setting base permissions…Done
Setting specific permissions…
27778 [============================]
Finished setting permissions
Unable to run Pre-Asterisk hooks, because Asterisk is already running on PID 1525 and has been running for 3 minutes, 42 seconds
Running Asterisk post from Dahdiconfig module
Running Asterisk post from Ucpnode module
UCP Node Server has already been running on PID 2712 for 3 minutes, 37 seconds
Running Asterisk post from Xmpp module
Resetting PBX Users Failed: The command “node /var/www/html/admin/modules/xmpp/node/resetpbxusers.js” faile d.

Exit Code: 1(General error)

Working directory: /root

Output:

Error Output:

module.js:338
throw err;
^
Error: Cannot find module ‘async’
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/var/www/html/admin/modules/xmpp/node/resetpbxusers.js:3:13)
at Module._compile (module.js:460:26)
at Object.Module._extensions…js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)

I tried to uninstall the module and reinstall it, but the error keeps coming up.

You can restart the deamon by running.

fwconsole restart xmpp

How did you uninstall/re-install?

I would run

fwconsole ma uninstall xmpp --force
fwconsole ma delete xmpp
fwconsole ma downloadinstall xmpp --force
fwconsole reload 

But be careful, it’ll delete your xmpp config (if you have any)

I tried this solution and not works

[[email protected] ~]# fwconsole ma uninstall xmpp --force
Stopping old running processes…Done
Module xmpp successfully uninstalled
Updating Hooks…Done
[[email protected] ~]# fwconsole ma delete xmpp
Module xmpp successfully deleted
Updating Hooks…Done
[[email protected] ~]# fwconsole ma downloadinstall xmpp --force
No repos specified, using: [standard,commercial] from last GUI settings

Starting xmpp download…
Processing xmpp
Downloading…
165209/165209 [============================] 100%
Finished downloading
Extracting…Done
Module xmpp successfully downloaded
Installing/Updating Required Libraries. This may take a while…The following messages are ONLY FOR DEBUGGING. Ignore anything that says ‘WARN’ or is just a warning
npm WARN deprecated [email protected]: Package no longer supported. Contact for more info.
Installed npm-cache v0.7.0
Running installation…
[npm-cache] [INFO] using /home/asterisk/.package_cache as cache directory
[npm-cache] [INFO] [composer] Dependency config file /var/www/html/admin/modules/xmpp/node/composer.json does not exist. Skipping install
[npm-cache] [INFO] [npm] config file exists
[npm-cache] [INFO] [npm] cli exists
[npm-cache] [INFO] [npm] hash of /var/www/html/admin/modules/xmpp/node/package.json: af6707edb2ff5e018e26921cb83ae4fd
[npm-cache] [INFO] [npm] running [npm install]…
npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:14:12)
npm WARN addRemoteGit at F (/usr/lib/node_modules/npm/node_modules/which/which.js:69:19)
npm WARN addRemoteGit at E (/usr/lib/node_modules/npm/node_modules/which/which.js:81:29)
npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/which.js:90:16
npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
npm WARN addRemoteGit at FSReqWrap.oncomplete (fs.js:95:15)
npm WARN addRemoteGit sangoma/lets-chat#931bc86 resetting remote /home/asterisk/.npm/_git-remotes/git-github-com-sangoma-lets-chat-git-6bde9c86 because of error: { [Error: not found: git] code: ‘ENOGIT’ }
npm ERR! git clone --template=/home/asterisk/.npm/_git-remotes/_templates --mirror /home/asterisk/.npm/_git-remotes/git-github-com-sangoma-lets-chat-git-6bde9c86: undefined
npm ERR! git clone --template=/home/asterisk/.npm/_git-remotes/_templates --mirror /home/asterisk/.npm/_git-remotes/git-github-com-sangoma-lets-chat-git-6bde9c86: undefined
npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:14:12)
npm WARN addRemoteGit at F (/usr/lib/node_modules/npm/node_modules/which/which.js:69:19)
npm WARN addRemoteGit at E (/usr/lib/node_modules/npm/node_modules/which/which.js:81:29)
npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/which.js:90:16
npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
npm WARN addRemoteGit at FSReqWrap.oncomplete (fs.js:95:15)
npm WARN addRemoteGit sangoma/lets-chat#931bc86 resetting remote /home/asterisk/.npm/_git-remotes/https-github-com-sangoma-lets-chat-git-f2569456 because of error: { [Error: not found: git] code: ‘ENOGIT’ }
npm ERR! git clone --template=/home/asterisk/.npm/_git-remotes/_templates --mirror
url edited /sangoma/lets-chat.git /home/asterisk/.npm/_git-remotes/https-github-com-sangoma-lets-chat-git-f2569456: undefined
npm ERR! git clone --template=/home/asterisk/.npm/_git-remotes/_templates --mirror url edited/sangoma/lets-chat.git /home/asterisk/.npm/_git-remotes/https-github-com-sangoma-lets-chat-git-f2569456: undefined
npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:14:12)
npm WARN addRemoteGit at F (/usr/lib/node_modules/npm/node_modules/which/which.js:69:19)
npm WARN addRemoteGit at E (/usr/lib/node_modules/npm/node_modules/which/which.js:81:29)
npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/which.js:90:16
npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
npm WARN addRemoteGit at FSReqWrap.oncomplete (fs.js:95:15)
npm WARN addRemoteGit sangoma/lets-chat#931bc86 resetting remote /home/asterisk/.npm/_git-remotes/git-github-com-sangoma-lets-chat-git-ee283f0f because of error: { [Error: not found: git] code: ‘ENOGIT’ }
npm ERR! git clone --template=/home/asterisk/.npm/_git-remotes/_templates --mirror [email protected]:sangoma/lets-chat.git /home/asterisk/.npm/_git-remotes/git-github-com-sangoma-lets-chat-git-ee283f0f: undefined
npm ERR! git clone --template=/home/asterisk/.npm/_git-remotes/_templates --mirror [email protected]:sangoma/lets-chat.git /home/asterisk/.npm/_git-remotes/git-github-com-sangoma-lets-chat-git-ee283f0f: undefined
npm ERR! Linux 2.6.32-642.6.2.el6.x86_64
npm ERR! argv “/usr/bin/node” “/usr/bin/npm” “install”
npm ERR! node v0.12.18
npm ERR! npm v2.15.11
npm ERR! code ENOGIT

npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! Please include the following file with any support request:
npm ERR! /var/www/html/admin/modules/xmpp/node/npm-debug.log
[npm-cache] [ERROR] [npm] error running npm install
[npm-cache] [ERROR] error installing dependencies

Run:

yum install git

and reinstall xmpp module

Thanks!!!

All solved!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.