[Fixed] Upgrade failed - UCP Node Server 13.0.9 to 13.0.11

Got an error trying to do the upgrade

"Error(s) installing ucpnode:

  • Failed to run installation scripts

“Please review the install log”

Looks like she can’t make the directory, captain!

    COPY Release/sqlclient.node
make: Leaving directory `/var/www/html/admin/modules/ucpnode/node/node_modules/mariasql/build'
[email protected] node_modules/mariasql
└── [email protected]
npm ERR! Error: EACCES, mkdir '/home/asterisk/.npm/node-expat/2.3.11'
npm ERR!  { [Error: EACCES, mkdir '/home/asterisk/.npm/node-expat/2.3.11']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/home/asterisk/.npm/node-expat/2.3.11',
npm ERR!   parent: 'ltx' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Linux 2.6.32-504.8.1.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "update"
npm ERR! cwd /var/www/html/admin/modules/ucpnode/node
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! path /home/asterisk/.npm/node-expat/2.3.11
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/home/asterisk/.npm/node-expat/2.3.11'
npm ERR! not ok code 0

You should either: A) create the directory. B) figure out why Asterisk can’t create the directory

What type of install is this? /home/asterisk should be owned by the asterisk user and writeable by the asterisk user.

Official FreePBX distro Centos 6.5 w/ 13.0.11 FreePBX.

So I have not touched permissions, why is this not working. I can certainly create the directory, but why is the install not doing it.

Navigated to: /home/asterisk/ didn’t see the directory until I enabled hidden, and saw that .npm is hidden. Went in /home/asterisk/.npm/node-expat, and created the directory 2.3.11.

There already was a directory 2.3.10, owned by asterisk…the parent directory (node-expat) is owned by root.

I had the same issue and had to fix the permissions on the directory as well. I suspect it is because on one of the earlier updates to UCP node I had to run the npm install manually and I did so as root which created the directories and set them up as owned by root.

1 Like

I too had the directory ownership as root, and also suspect that it may have occurred due to the manual npm install previously. Changing the ownership to asterisk resolved the problem.

Cheers,
Mike

1 Like

Kept running into npm ERR! stack Error: EACCES, mkdir [whatever directory here]

I create the directory that it complains it can’t make, assign owner to asterisk, then run install through module admin again. Then it complains about another directory…etc, etc.

So, after creating these, and assigning owner to asterisk:

home/asterisk/.npm/node-expat/2.3.11
/home/asterisk/.npm/websocket-driver/0.6.3
/home/asterisk/.npm/node-stringprep/0.7.3

I got tired, started watching Narcos on Netflix, with a good cup of ice cream. That certainly was more enjoyable.

Install of UCP Node Server, a component that I really don’t need anyway is still mucked up.

Goodnight.

The only command you should need to run is this:

chown -R asterisk. /home/asterisk

Note there’s a dot there, but that’s it. That should fix all your permisison issues.

1 Like

Rob,

Yes, Sir, that did the trick! Thank you. UCP Node Server is now updated and installed.

1 Like

Or just remove the .npm directory all together and let it recreate it.

Or run install as root.