Closed fubax closed 7 years ago
I need a newbie help to install mosca on RPI3. when I run the following command I get this error:
pi@raspberrypi:~$ npm install mosca pino -g npm ERR! tar.unpack untar error /home/pi/.npm/pino/3.0.4/package.tgz npm ERR! tar.unpack untar error /home/pi/.npm/mosca/2.2.0/package.tgz npm ERR! Linux 4.1.18-v7+ npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "mosca" "pino" "-g" npm ERR! node v4.3.1 npm ERR! npm v2.14.12 npm ERR! path /usr/lib/node_modules/pino npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall mkdir npm ERR! Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/pino' npm ERR! at Error (native) npm ERR! { [Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/pino'] npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'mkdir', npm ERR! path: '/usr/lib/node_modules/pino', npm ERR! fstream_type: 'Directory', npm ERR! fstream_path: '/usr/lib/node_modules/pino', npm ERR! fstream_class: 'DirWriter', npm ERR! fstream_stack: npm ERR! [ '/usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:35:25', npm ERR! '/usr/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53', npm ERR! 'FSReqWrap.oncomplete (fs.js:82:15)' ] } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! Please include the following file with any support request: npm ERR! /home/pi/npm-debug.log pi@raspberrypi:~$
Read: https://docs.npmjs.com/getting-started/fixing-npm-permissions
I need a newbie help to install mosca on RPI3. when I run the following command I get this error: