When I try to install it with npm using the sudo npm install -g node-pty command, it fails with the following output:
> node-pty@0.10.1 install /usr/lib/node_modules/node-pty
> node scripts/install.js
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/16.11.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/node-pty/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/node-pty/.node-gyp'
gyp ERR! System Linux 5.10.76-1-lts
gyp ERR! command "/usr/bin/node" "/home/sid/.config/yarn/global/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/node-pty
gyp ERR! node -v v16.11.1
gyp ERR! node-gyp -v v5.1.1
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-pty@0.10.1 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-pty@0.10.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-11-16T15_34_17_497Z-debug.log
Environment details
Issue description
When I run
yarn global add node-pty
, the command freezes with the following output:When I try to install it with npm using the
sudo npm install -g node-pty
command, it fails with the following output: