Not able to install memlab with npm package

77 views Asked by At

So, I've been trying to install memlab library from Meta's github. When I installed without -g, it got installed successfully, but I wasn't to use the memlab commands, I kept getting error that memlab command not found.

Everytime I run:

npm install -g memlab

I get a list of errors:

npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/memlab
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/memlab'
npm ERR!  [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/memlab'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/local/lib/node_modules/memlab'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

when i use:

npm install -g memlab root/Administrator

I get:

npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/root/Administrator.git
npm ERR! [email protected]: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR! 
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.

npm ERR! A complete log of this run can be found in: /Users/harshit4.dubey/.npm/_logs/2023-10-17T19_05_42_796Z-debug-0.log

I've been trying to get rid of this error, but I couldn't get any solution

2

There are 2 answers

1
Hdby On

Apparently, memlab doesn't provide support for nodejs version> 16.

0
Guru System On

I'm using node v20.9.0. I have no problem installing memlab. Reading the error message you got, you have a permission issue installing npm package globally on your OS. So npm -g any npm package will get the same error.