botgram / shell-bot

:robot: Telegram bot that executes commands and sends the live output
GNU General Public License v3.0
787 stars 493 forks source link

npm install fail on Ubuntu 18.04 #13

Closed Sammers21 closed 4 years ago

Sammers21 commented 4 years ago
~/shell-bot# npm install

> node-pty@0.8.1 install /root/shell-bot/node_modules/node-pty
> node scripts/install.js

make: Entering directory '/root/shell-bot/node_modules/node-pty/build'
  CXX(target) Release/obj.target/pty/src/unix/pty.o
virtual memory exhausted: Cannot allocate memory
pty.target.mk:95: recipe for target 'Release/obj.target/pty/src/unix/pty.o' failed
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
make: Leaving directory '/root/shell-bot/node_modules/node-pty/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.15.0-52-generic
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /root/shell-bot/node_modules/node-pty
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm ERR! Linux 4.15.0-52-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! node-pty@0.8.1 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-pty@0.8.1 install script 'node scripts/install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-pty package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-pty
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls node-pty
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /root/shell-bot/npm-debug.log
Sammers21 commented 4 years ago

Ha, that is because of the node version. 10+ is required.

mildsunrise commented 4 years ago

Yes :)