botgram / shell-bot

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

failed trying to trying to build on Ubuntu 16.04 with node v4.2.6 and npm v3.5.2 #12

Closed davros123 closed 5 years ago

davros123 commented 5 years ago

Hi I am trying to build on Ubuntu 16.04 with node v4.2.6 and npm v3.5.2 I installed v10.15.3 and npm 6.4.1 and got the same issue.

48 apt install -y make python build-essential 49 npm -v 50 sudo apt-get install nodejs 51 sudo apt-get install nodejs-legacy 52 sudo apt-get install npm 53 git clone https://github.com/botgram/shell-bot.git && cd shell-bot 54 npm install

And I get the following error:


loadDep:socks-proxy-agent ▄ ╢██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine socks-proxy-agent@4.0.2: wanted: {"node":">= 6"} (current: {"node":"                                                    loadDep:socks-proxy-agent ▀ ╢██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine https-proxy-agent@2.2.1: wanted: {"node":">= 4.5.0"} (current: {"nod                                                    loadDep:socks → 200       ▄ ╢██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine socks@2.3.2: wanted: {"node":">= 6.0.0","npm":">= 3.0.0"} (current:                                                     
> node-pty@0.8.1 install /root/shell-bot/node_modules/node-pty
> node scripts/install.js

module.js:328
    throw err;
    ^

Error: Cannot find module '/root/shell-bot/node_modules/node-pty/scripts/install                                                    .js'
    at Function.Module._resolveFilename (module.js:326:15)
    at Function.Module._load (module.js:277:25)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3
shell-bot@0.0.1 /root/shell-bot
├─┬ botgram@2.2.0
│ ├─┬ form-data@2.3.3
│ │ ├── asynckit@0.4.0
│ │ ├─┬ combined-stream@1.0.7
│ │ │ └── delayed-stream@1.0.0
│ │ └─┬ mime-types@2.1.22
│ │   └── mime-db@1.38.0
│ └─┬ minimatch@3.0.4
│   └─┬ brace-expansion@1.1.11
│     ├── balanced-match@1.0.0
│     └── concat-map@0.0.1
├── escape-html@1.0.3
├─┬ https-proxy-agent@2.2.1
│ ├─┬ agent-base@4.2.1
│ │ └─┬ es6-promisify@5.0.0
│ │   └── es6-promise@4.2.6
│ └─┬ debug@3.2.6
│   └── ms@2.1.1
├── mime@1.6.0
├─┬ node-termios@0.0.12
│ └── nan@2.12.1
├─┬ socks-proxy-agent@4.0.2
│ └─┬ socks@2.3.2
│   ├── ip@1.1.5
│   └── smart-buffer@4.0.2
└── terminal.js@1.0.9

npm ERR! Linux 4.4.0-143-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.2.6
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

root@Ubuntu16:~/shell-bot#

With node 10 I get the following error log...

cat /root/.npm/_logs/2019-03-26T10_31_40_349Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install' ]
2 info using npm@6.4.1
3 info using node@v10.15.3
4 verbose npm-session 608aa7399c9933f1
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall shell-bot@0.0.1
7 info lifecycle shell-bot@0.0.1~preinstall: shell-bot@0.0.1
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 timing stage:loadCurrentTree Completed in 90ms
11 silly install loadIdealTree
12 silly install cloneCurrentTreeToIdealTree
13 timing stage:loadIdealTree:cloneCurrentTree Completed in 1ms
14 silly install loadShrinkwrap
15 timing stage:loadIdealTree:loadShrinkwrap Completed in 45ms
16 silly install loadAllDepsIntoIdealTree
17 timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 32ms
18 timing stage:loadIdealTree Completed in 94ms
19 silly currentTree shell-bot@0.0.1
19 silly currentTree ├── agent-base@4.2.1
19 silly currentTree ├── asynckit@0.4.0
19 silly currentTree ├── balanced-match@1.0.0
19 silly currentTree ├── botgram@2.2.0
19 silly currentTree ├── brace-expansion@1.1.11
19 silly currentTree ├── combined-stream@1.0.7
19 silly currentTree ├── concat-map@0.0.1
19 silly currentTree ├── debug@3.2.6
19 silly currentTree ├── delayed-stream@1.0.0
19 silly currentTree ├── es6-promise@4.2.6
19 silly currentTree ├── es6-promisify@5.0.0
19 silly currentTree ├── escape-html@1.0.3
19 silly currentTree ├── form-data@2.3.3
19 silly currentTree ├── https-proxy-agent@2.2.1
19 silly currentTree ├── ip@1.1.5
19 silly currentTree ├── mime-db@1.38.0
19 silly currentTree ├── mime-types@2.1.22
19 silly currentTree ├── mime@1.6.0
19 silly currentTree ├── minimatch@3.0.4
19 silly currentTree ├── ms@2.1.1
19 silly currentTree ├── nan@2.12.1
19 silly currentTree ├── node-termios@0.0.12
19 silly currentTree ├── smart-buffer@4.0.2
19 silly currentTree ├── socks-proxy-agent@4.0.2
19 silly currentTree ├── socks@2.3.2
19 silly currentTree └── terminal.js@1.0.9
20 silly idealTree shell-bot@0.0.1
20 silly idealTree ├── agent-base@4.2.1
20 silly idealTree ├── asynckit@0.4.0
20 silly idealTree ├── balanced-match@1.0.0
20 silly idealTree ├── botgram@2.2.0
20 silly idealTree ├── brace-expansion@1.1.11
20 silly idealTree ├── combined-stream@1.0.7
20 silly idealTree ├── concat-map@0.0.1
20 silly idealTree ├── debug@3.2.6
20 silly idealTree ├── delayed-stream@1.0.0
20 silly idealTree ├── es6-promise@4.2.6
20 silly idealTree ├── es6-promisify@5.0.0
20 silly idealTree ├── escape-html@1.0.3
20 silly idealTree ├── form-data@2.3.3
20 silly idealTree ├── https-proxy-agent@2.2.1
20 silly idealTree ├── ip@1.1.5
20 silly idealTree ├── mime-db@1.38.0
20 silly idealTree ├── mime-types@2.1.22
20 silly idealTree ├── mime@1.6.0
20 silly idealTree ├── minimatch@3.0.4
20 silly idealTree ├── ms@2.1.1
20 silly idealTree ├── nan@2.12.1
20 silly idealTree ├── node-pty@0.8.1
20 silly idealTree ├── node-termios@0.0.12
20 silly idealTree ├── smart-buffer@4.0.2
20 silly idealTree ├── socks-proxy-agent@4.0.1
20 silly idealTree ├── socks@2.2.3
20 silly idealTree └── terminal.js@1.0.9
21 silly install generateActionsToTake
22 timing stage:generateActionsToTake Completed in 10ms
23 silly diffTrees action count 3
24 silly diffTrees update socks@2.2.3
25 silly diffTrees add node-pty@0.8.1
26 silly diffTrees update socks-proxy-agent@4.0.1
27 silly decomposeActions action count 28
28 silly decomposeActions unbuild socks@2.3.2
29 silly decomposeActions remove socks@2.3.2
30 silly decomposeActions fetch socks@2.2.3
31 silly decomposeActions extract socks@2.2.3
32 silly decomposeActions preinstall socks@2.2.3
33 silly decomposeActions build socks@2.2.3
34 silly decomposeActions install socks@2.2.3
35 silly decomposeActions postinstall socks@2.2.3
36 silly decomposeActions finalize socks@2.2.3
37 silly decomposeActions refresh-package-json socks@2.2.3
38 silly decomposeActions fetch node-pty@0.8.1
39 silly decomposeActions extract node-pty@0.8.1
40 silly decomposeActions preinstall node-pty@0.8.1
41 silly decomposeActions build node-pty@0.8.1
42 silly decomposeActions install node-pty@0.8.1
43 silly decomposeActions postinstall node-pty@0.8.1
44 silly decomposeActions finalize node-pty@0.8.1
45 silly decomposeActions refresh-package-json node-pty@0.8.1
46 silly decomposeActions unbuild socks-proxy-agent@4.0.2
47 silly decomposeActions remove socks-proxy-agent@4.0.2
48 silly decomposeActions fetch socks-proxy-agent@4.0.1
49 silly decomposeActions extract socks-proxy-agent@4.0.1
50 silly decomposeActions preinstall socks-proxy-agent@4.0.1
51 silly decomposeActions build socks-proxy-agent@4.0.1
52 silly decomposeActions install socks-proxy-agent@4.0.1
53 silly decomposeActions postinstall socks-proxy-agent@4.0.1
54 silly decomposeActions finalize socks-proxy-agent@4.0.1
55 silly decomposeActions refresh-package-json socks-proxy-agent@4.0.1
56 silly install executeActions
57 silly doSerial global-install 28
58 verbose correctMkdir /root/.npm/_locks correctMkdir not in flight; initializing
59 timing audit compress Completed in 5ms
60 info audit Submitting payload of 1520bytes
61 verbose lock using /root/.npm/_locks/staging-08b964d67b451cf4.lock for /root/shell-bot/node_modules/.staging
62 silly doParallel extract 3
63 silly extract socks@2.2.3
64 silly extract node-pty@0.8.1
65 silly extract socks-proxy-agent@4.0.1
66 silly tarball trying socks@2.2.3 by hash: sha512-+2r83WaRT3PXYoO/1z+RDEBE7Z2f9YcdQnJ0K/ncXXbV5gJ6wYfNAebYFYiiUjM6E4JyXnPY8cimwyvFYHVUUA==
67 silly tarball trying node-pty@0.8.1 by hash: sha512-j+/g0Q5dR+vkELclpJpz32HcS3O/3EdPSGPvDXJZVJQLCvgG0toEbfmymxAEyQyZEpaoKHAcoL+PvKM+4N9nlw==
68 silly tarball trying socks-proxy-agent@4.0.1 by hash: sha512-Kezx6/VBguXOsEe5oU3lXYyKMi4+gva72TwJ7pQY5JfqUx2nMk7NXA6z/mpNqIlfQjWYVfeuNvQjexiTaTn6Nw==
69 silly tarball no local data for socks@2.2.3. Extracting by manifest.
70 silly tarball no local data for node-pty@0.8.1. Extracting by manifest.
71 silly tarball no local data for socks-proxy-agent@4.0.1. Extracting by manifest.
72 http fetch GET 200 https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz 220ms
73 http fetch GET 200 https://registry.npmjs.org/socks/-/socks-2.2.3.tgz 230ms
74 silly extract socks-proxy-agent@4.0.1 extracted to /root/shell-bot/node_modules/.staging/socks-proxy-agent-042b4020 (246ms)
75 silly extract socks@2.2.3 extracted to /root/shell-bot/node_modules/.staging/socks-8e40702b (297ms)
76 http fetch GET 200 https://registry.npmjs.org/node-pty/-/node-pty-0.8.1.tgz 367ms
77 silly extract node-pty@0.8.1 extracted to /root/shell-bot/node_modules/.staging/node-pty-15f1b2ec (393ms)
78 timing action:extract Completed in 398ms
79 silly doReverseSerial unbuild 28
80 silly unbuild socks-proxy-agent@4.0.2
81 info lifecycle socks-proxy-agent@4.0.2~preuninstall: socks-proxy-agent@4.0.2
82 info lifecycle socks-proxy-agent@4.0.2~uninstall: socks-proxy-agent@4.0.2
83 verbose unbuild rmStuff socks-proxy-agent@4.0.2 from /root/shell-bot/node_modules
84 info lifecycle socks-proxy-agent@4.0.2~postuninstall: socks-proxy-agent@4.0.2
85 silly unbuild socks@2.3.2
86 info lifecycle socks@2.3.2~preuninstall: socks@2.3.2
87 info lifecycle socks@2.3.2~uninstall: socks@2.3.2
88 verbose unbuild rmStuff socks@2.3.2 from /root/shell-bot/node_modules
89 info lifecycle socks@2.3.2~postuninstall: socks@2.3.2
90 timing action:unbuild Completed in 3ms
91 silly doSerial remove 28
92 silly remove /root/shell-bot/node_modules/socks
93 silly remove /root/shell-bot/node_modules/socks-proxy-agent
94 timing action:remove Completed in 23ms
95 silly doSerial move 28
96 silly doSerial finalize 28
97 silly finalize /root/shell-bot/node_modules/socks
98 silly finalize /root/shell-bot/node_modules/node-pty
99 silly finalize /root/shell-bot/node_modules/socks-proxy-agent
100 timing action:finalize Completed in 5ms
101 silly doParallel refresh-package-json 3
102 silly refresh-package-json /root/shell-bot/node_modules/socks
103 silly refresh-package-json /root/shell-bot/node_modules/node-pty
104 silly refresh-package-json /root/shell-bot/node_modules/socks-proxy-agent
105 timing action:refresh-package-json Completed in 13ms
106 silly doParallel preinstall 3
107 silly preinstall socks@2.2.3
108 info lifecycle socks@2.2.3~preinstall: socks@2.2.3
109 silly preinstall node-pty@0.8.1
110 info lifecycle node-pty@0.8.1~preinstall: node-pty@0.8.1
111 silly preinstall socks-proxy-agent@4.0.1
112 info lifecycle socks-proxy-agent@4.0.1~preinstall: socks-proxy-agent@4.0.1
113 timing action:preinstall Completed in 1ms
114 silly doSerial build 28
115 silly build socks@2.2.3
116 info linkStuff socks@2.2.3
117 silly linkStuff socks@2.2.3 has /root/shell-bot/node_modules as its parent node_modules
118 silly build node-pty@0.8.1
119 info linkStuff node-pty@0.8.1
120 silly linkStuff node-pty@0.8.1 has /root/shell-bot/node_modules as its parent node_modules
121 silly build socks-proxy-agent@4.0.1
122 info linkStuff socks-proxy-agent@4.0.1
123 silly linkStuff socks-proxy-agent@4.0.1 has /root/shell-bot/node_modules as its parent node_modules
124 timing action:build Completed in 1ms
125 silly doSerial global-link 28
126 silly doParallel update-linked 0
127 silly doSerial install 28
128 silly install socks@2.2.3
129 info lifecycle socks@2.2.3~install: socks@2.2.3
130 silly install node-pty@0.8.1
131 info lifecycle node-pty@0.8.1~install: node-pty@0.8.1
132 verbose lifecycle node-pty@0.8.1~install: unsafe-perm in lifecycle false
133 verbose lifecycle node-pty@0.8.1~install: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/root/shell-bot/node_modules/node-pty/node_modules/.bin:/root/shell-bot/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
134 verbose lifecycle node-pty@0.8.1~install: CWD: /root/shell-bot/node_modules/node-pty
135 silly lifecycle node-pty@0.8.1~install: Args: [ '-c', 'node scripts/install.js' ]
136 silly lifecycle node-pty@0.8.1~install: Returned: code: 1  signal: null
137 info lifecycle node-pty@0.8.1~install: Failed to exec install script
138 timing action:install Completed in 80ms
139 verbose unlock done using /root/.npm/_locks/staging-08b964d67b451cf4.lock for /root/shell-bot/node_modules/.staging
140 timing stage:rollbackFailedOptional Completed in 56ms
141 timing stage:runTopLevelLifecycles Completed in 1054ms
142 silly saveTree shell-bot@0.0.1
142 silly saveTree ├─┬ botgram@2.2.0
142 silly saveTree │ ├── escape-html@1.0.3
142 silly saveTree │ ├─┬ form-data@2.3.3
142 silly saveTree │ │ ├── asynckit@0.4.0
142 silly saveTree │ │ ├─┬ combined-stream@1.0.7
142 silly saveTree │ │ │ └── delayed-stream@1.0.0
142 silly saveTree │ │ └─┬ mime-types@2.1.22
142 silly saveTree │ │   └── mime-db@1.38.0
142 silly saveTree │ └─┬ minimatch@3.0.4
142 silly saveTree │   └─┬ brace-expansion@1.1.11
142 silly saveTree │     ├── balanced-match@1.0.0
142 silly saveTree │     └── concat-map@0.0.1
142 silly saveTree ├── escape-html@1.0.3
142 silly saveTree ├─┬ https-proxy-agent@2.2.1
142 silly saveTree │ ├─┬ agent-base@4.2.1
142 silly saveTree │ │ └─┬ es6-promisify@5.0.0
142 silly saveTree │ │   └── es6-promise@4.2.6
142 silly saveTree │ └─┬ debug@3.2.6
142 silly saveTree │   └── ms@2.1.1
142 silly saveTree ├── mime@1.6.0
142 silly saveTree ├─┬ node-pty@0.8.1
142 silly saveTree │ └── nan@2.12.1
142 silly saveTree ├── node-termios@0.0.12
142 silly saveTree ├─┬ socks-proxy-agent@4.0.1
142 silly saveTree │ └─┬ socks@2.2.3
142 silly saveTree │   ├── ip@1.1.5
142 silly saveTree │   └── smart-buffer@4.0.2
142 silly saveTree └── terminal.js@1.0.9
143 verbose stack Error: node-pty@0.8.1 install: `node scripts/install.js`
143 verbose stack Exit status 1
143 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
143 verbose stack     at EventEmitter.emit (events.js:189:13)
143 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
143 verbose stack     at ChildProcess.emit (events.js:189:13)
143 verbose stack     at maybeClose (internal/child_process.js:970:16)
143 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
144 verbose pkgid node-pty@0.8.1
145 verbose cwd /root/shell-bot
146 verbose Linux 4.4.0-143-generic
147 verbose argv "/usr/bin/node" "/usr/bin/npm" "install"
148 verbose node v10.15.3
149 verbose npm  v6.4.1
150 error code ELIFECYCLE
151 error errno 1
152 error node-pty@0.8.1 install: `node scripts/install.js`
152 error Exit status 1
153 error Failed at the node-pty@0.8.1 install script.
153 error This is probably not a problem with npm. There is likely additional logging output above.
154 verbose exit [ 1, true ]
mildsunrise commented 5 years ago

Hi! The Node.JS version at Ubuntu/Debian repos is pretty old and won't work.

I see you've also tried with Node v10 and it fails as well. The problem is in the node-pty package. Try doing npm install node-pty and if that fails, do cd node_modules/node-pty; node scripts/install.js and post its output.

davros123 commented 5 years ago

Thankyou for the reply!!! (I did install 10 to a fresh U16.04 server VM and it also failed in the same way). I have done it again on a fresh install and still have an issue that there is no node-pty.

apt install -y make python build-essential curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - npm -v <---(confirmed none installed) node -v <---(confirmed none installed) apt-get install nodejs npm -v
node -v git clone https://github.com/botgram/shell-bot.git && cd shell-bot npm install this fails with the following....

root@Ubuntu16:~# uname -a
Linux Ubuntu16 4.4.0-143-generic #169-Ubuntu SMP Thu Feb 7 07:56:38 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
root@Ubuntu16:~#
root@Ubuntu16:~# npm -v
6.4.1
root@Ubuntu16:~# node -v
v10.15.3
root@Ubuntu16:~/shell-bot# npm install

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

internal/modules/cjs/loader.js:584
    throw err;
    ^

Error: Cannot find module '/root/shell-bot/node_modules/node-pty/scripts/install.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
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.
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/2019-03-27T01_42_01_996Z-debug.log
root@Ubuntu16:~/shell-bot#

npm install node-pty fails with the following

root@Ubuntu16:~/shell-bot# npm install node-pty

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

internal/modules/cjs/loader.js:584
    throw err;
    ^

Error: Cannot find module '/root/shell-bot/node_modules/node-pty/scripts/install.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
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.
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/2019-03-27T01_30_09_088Z-debug.log
root@Ubuntu16:~/shell-bot#

I can not run "cd node_modules/node-pty; node scripts/install.js" as there is no node_modules/node-pty directory. There is no "node-pty"

root@Ubuntu16:~/shell-bot#  find / -name "node-pty"
root@Ubuntu16:~/shell-bot#
root@Ubuntu16:~/shell-bot# find / -name "install.js"
/usr/lib/node_modules/npm/node_modules/node-gyp/lib/install.js
/usr/lib/node_modules/npm/node_modules/npm-audit-report/reporters/install.js
/usr/lib/node_modules/npm/lib/install/action/install.js
/usr/lib/node_modules/npm/lib/install.js
/root/shell-bot/node_modules/node-termios/install.js
root@Ubuntu16:~/shell-bot#
root@Ubuntu16:~/shell-bot# find / -name "node_modules"
/usr/lib/node_modules
/usr/lib/node_modules/npm/node_modules
/usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic/node_modules
/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules
/usr/lib/node_modules/npm/node_modules/pumpify/node_modules
/usr/lib/node_modules/npm/node_modules/debug/node_modules
/usr/lib/node_modules/npm/node_modules/libnpmhook/node_modules
/usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules
/usr/lib/node_modules/npm/node_modules/string-width/node_modules
/usr/lib/node_modules/npm/node_modules/gauge/node_modules
/usr/lib/node_modules/npm/node_modules/npm-registry-client/node_modules
/usr/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules
/usr/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules
/usr/lib/node_modules/npm/node_modules/wide-align/node_modules
/usr/lib/node_modules/npm/node_modules/minipass/node_modules
/usr/lib/node_modules/npm/node_modules/tar/node_modules
/usr/lib/node_modules/npm/node_modules/promise-retry/node_modules
/usr/lib/node_modules/npm/node_modules/cliui/node_modules
/usr/lib/node_modules/npm/node_modules/yargs/node_modules
/usr/lib/node_modules/npm/node_modules/gentle-fs/node_modules
/usr/lib/node_modules/npm/node_modules/copy-concurrently/node_modules
/usr/lib/node_modules/npm/node_modules/rc/node_modules
/usr/lib/node_modules/npm/node_modules/sorted-union-stream/node_modules
/root/shell-bot/node_modules
root@Ubuntu16:~/shell-bot#

FYI - here are the build essentials log output and the NodeJS.10

root@Ubuntu16:~# apt install -y make python build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  binutils cpp cpp-5 dpkg-dev fakeroot g++ g++-5 gcc gcc-5 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan2 libatomic1 libc-dev-bin libc6-dev
  libcc1-0 libcilkrts5 libdpkg-perl libfakeroot libfile-fcntllock-perl libgcc-5-dev libgomp1 libisl15 libitm1 liblsan0 libmpc3 libmpx0 libpython-stdlib libpython2.7-minimal
  libpython2.7-stdlib libquadmath0 libstdc++-5-dev libtsan0 libubsan0 linux-libc-dev manpages-dev python-minimal python2.7 python2.7-minimal
Suggested packages:
  binutils-doc cpp-doc gcc-5-locales debian-keyring g++-multilib g++-5-multilib gcc-5-doc libstdc++6-5-dbg gcc-multilib autoconf automake libtool flex bison gdb gcc-doc
  gcc-5-multilib libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan2-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx0-dbg libquadmath0-dbg
  glibc-doc libstdc++-5-doc make-doc python-doc python-tk python2.7-doc binfmt-support
The following NEW packages will be installed:
  binutils build-essential cpp cpp-5 dpkg-dev fakeroot g++ g++-5 gcc gcc-5 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan2 libatomic1
  libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libdpkg-perl libfakeroot libfile-fcntllock-perl libgcc-5-dev libgomp1 libisl15 libitm1 liblsan0 libmpc3 libmpx0 libpython-stdlib
  libpython2.7-minimal libpython2.7-stdlib libquadmath0 libstdc++-5-dev libtsan0 libubsan0 linux-libc-dev make manpages-dev python python-minimal python2.7 python2.7-minimal
0 to upgrade, 43 to newly install, 0 to remove and 12 not to upgrade.
Need to get 42.0 MB of archives.
After this operation, 160 MB of additional disk space will be used.
Get:1 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-minimal amd64 2.7.12-1ubuntu0~16.04.4 [339 kB]
Get:2 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7-minimal amd64 2.7.12-1ubuntu0~16.04.4 [1,261 kB]
Get:3 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-minimal amd64 2.7.12-1~16.04 [28.1 kB]
Get:4 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-stdlib amd64 2.7.12-1ubuntu0~16.04.4 [1,880 kB]
Get:5 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7 amd64 2.7.12-1ubuntu0~16.04.4 [224 kB]
Get:6 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython-stdlib amd64 2.7.12-1~16.04 [7,768 B]
Get:7 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python amd64 2.7.12-1~16.04 [137 kB]
Get:8 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 libmpc3 amd64 1.0.3-1 [39.7 kB]
Get:9 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 binutils amd64 2.26.1-1ubuntu1~16.04.8 [2,312 kB]
Get:10 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libc-dev-bin amd64 2.23-0ubuntu11 [68.5 kB]
Get:11 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-libc-dev amd64 4.4.0-143.169 [870 kB]
Get:12 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libc6-dev amd64 2.23-0ubuntu11 [2,086 kB]
Get:13 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 libisl15 amd64 0.16.1-1 [524 kB]
Get:14 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 cpp-5 amd64 5.4.0-6ubuntu1~16.04.11 [7,660 kB]
Get:15 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 cpp amd64 4:5.3.1-1ubuntu1 [27.7 kB]
Get:16 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcc1-0 amd64 5.4.0-6ubuntu1~16.04.11 [38.8 kB]
Get:17 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgomp1 amd64 5.4.0-6ubuntu1~16.04.11 [55.0 kB]
Get:18 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libitm1 amd64 5.4.0-6ubuntu1~16.04.11 [27.4 kB]
Get:19 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libatomic1 amd64 5.4.0-6ubuntu1~16.04.11 [8,896 B]
Get:20 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libasan2 amd64 5.4.0-6ubuntu1~16.04.11 [264 kB]
Get:21 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 liblsan0 amd64 5.4.0-6ubuntu1~16.04.11 [105 kB]
Get:22 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libtsan0 amd64 5.4.0-6ubuntu1~16.04.11 [244 kB]
Get:23 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libubsan0 amd64 5.4.0-6ubuntu1~16.04.11 [95.4 kB]
Get:24 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcilkrts5 amd64 5.4.0-6ubuntu1~16.04.11 [40.1 kB]
Get:25 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libmpx0 amd64 5.4.0-6ubuntu1~16.04.11 [9,748 B]
Get:26 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libquadmath0 amd64 5.4.0-6ubuntu1~16.04.11 [131 kB]
Get:27 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgcc-5-dev amd64 5.4.0-6ubuntu1~16.04.11 [2,229 kB]
Get:28 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 gcc-5 amd64 5.4.0-6ubuntu1~16.04.11 [8,417 kB]
Get:29 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 gcc amd64 4:5.3.1-1ubuntu1 [5,244 B]
Get:30 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libstdc++-5-dev amd64 5.4.0-6ubuntu1~16.04.11 [1,426 kB]
Get:31 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 g++-5 amd64 5.4.0-6ubuntu1~16.04.11 [8,310 kB]
Get:32 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 g++ amd64 4:5.3.1-1ubuntu1 [1,504 B]
Get:33 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 make amd64 4.1-6 [151 kB]
Get:34 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libdpkg-perl all 1.18.4ubuntu1.5 [195 kB]
Get:35 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 dpkg-dev all 1.18.4ubuntu1.5 [584 kB]
Get:36 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 build-essential amd64 12.1ubuntu2 [4,758 B]
Get:37 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 libfakeroot amd64 1.20.2-1ubuntu1 [25.5 kB]
Get:38 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 fakeroot amd64 1.20.2-1ubuntu1 [61.8 kB]
Get:39 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-perl all 1.19.03-1 [47.6 kB]
Get:40 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-xs-perl amd64 0.04-4build1 [11.0 kB]
Get:41 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-merge-perl all 0.08-3 [12.0 kB]
Get:42 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 libfile-fcntllock-perl amd64 0.22-3 [32.0 kB]
Get:43 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 manpages-dev all 4.04-2 [2,048 kB]
Fetched 42.0 MB in 57s (733 kB/s)
Extracting templates from packages: 100%
Selecting previously unselected package libpython2.7-minimal:amd64.
(Reading database ... 97446 files and directories currently installed.)
Preparing to unpack .../libpython2.7-minimal_2.7.12-1ubuntu0~16.04.4_amd64.deb ...
Unpacking libpython2.7-minimal:amd64 (2.7.12-1ubuntu0~16.04.4) ...
Selecting previously unselected package python2.7-minimal.
Preparing to unpack .../python2.7-minimal_2.7.12-1ubuntu0~16.04.4_amd64.deb ...
Unpacking python2.7-minimal (2.7.12-1ubuntu0~16.04.4) ...
Selecting previously unselected package python-minimal.
Preparing to unpack .../python-minimal_2.7.12-1~16.04_amd64.deb ...
Unpacking python-minimal (2.7.12-1~16.04) ...
Selecting previously unselected package libpython2.7-stdlib:amd64.
Preparing to unpack .../libpython2.7-stdlib_2.7.12-1ubuntu0~16.04.4_amd64.deb ...
Unpacking libpython2.7-stdlib:amd64 (2.7.12-1ubuntu0~16.04.4) ...
Selecting previously unselected package python2.7.
Preparing to unpack .../python2.7_2.7.12-1ubuntu0~16.04.4_amd64.deb ...
Unpacking python2.7 (2.7.12-1ubuntu0~16.04.4) ...
Selecting previously unselected package libpython-stdlib:amd64.
Preparing to unpack .../libpython-stdlib_2.7.12-1~16.04_amd64.deb ...
Unpacking libpython-stdlib:amd64 (2.7.12-1~16.04) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Setting up libpython2.7-minimal:amd64 (2.7.12-1ubuntu0~16.04.4) ...
Setting up python2.7-minimal (2.7.12-1ubuntu0~16.04.4) ...
Linking and byte-compiling packages for runtime python2.7...
Setting up python-minimal (2.7.12-1~16.04) ...
Selecting previously unselected package python.
(Reading database ... 98192 files and directories currently installed.)
Preparing to unpack .../python_2.7.12-1~16.04_amd64.deb ...
Unpacking python (2.7.12-1~16.04) ...
Selecting previously unselected package libmpc3:amd64.
Preparing to unpack .../libmpc3_1.0.3-1_amd64.deb ...
Unpacking libmpc3:amd64 (1.0.3-1) ...
Selecting previously unselected package binutils.
Preparing to unpack .../binutils_2.26.1-1ubuntu1~16.04.8_amd64.deb ...
Unpacking binutils (2.26.1-1ubuntu1~16.04.8) ...
Selecting previously unselected package libc-dev-bin.
Preparing to unpack .../libc-dev-bin_2.23-0ubuntu11_amd64.deb ...
Unpacking libc-dev-bin (2.23-0ubuntu11) ...
Selecting previously unselected package linux-libc-dev:amd64.
Preparing to unpack .../linux-libc-dev_4.4.0-143.169_amd64.deb ...
Unpacking linux-libc-dev:amd64 (4.4.0-143.169) ...
Selecting previously unselected package libc6-dev:amd64.
Preparing to unpack .../libc6-dev_2.23-0ubuntu11_amd64.deb ...
Unpacking libc6-dev:amd64 (2.23-0ubuntu11) ...
Selecting previously unselected package libisl15:amd64.
Preparing to unpack .../libisl15_0.16.1-1_amd64.deb ...
Unpacking libisl15:amd64 (0.16.1-1) ...
Selecting previously unselected package cpp-5.
Preparing to unpack .../cpp-5_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking cpp-5 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package cpp.
Preparing to unpack .../cpp_4%3a5.3.1-1ubuntu1_amd64.deb ...
Unpacking cpp (4:5.3.1-1ubuntu1) ...
Selecting previously unselected package libcc1-0:amd64.
Preparing to unpack .../libcc1-0_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libcc1-0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libgomp1:amd64.
Preparing to unpack .../libgomp1_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libgomp1:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libitm1:amd64.
Preparing to unpack .../libitm1_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libitm1:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libatomic1:amd64.
Preparing to unpack .../libatomic1_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libatomic1:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libasan2:amd64.
Preparing to unpack .../libasan2_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libasan2:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package liblsan0:amd64.
Preparing to unpack .../liblsan0_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking liblsan0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libtsan0:amd64.
Preparing to unpack .../libtsan0_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libtsan0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libubsan0:amd64.
Preparing to unpack .../libubsan0_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libubsan0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libcilkrts5:amd64.
Preparing to unpack .../libcilkrts5_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libcilkrts5:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libmpx0:amd64.
Preparing to unpack .../libmpx0_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libmpx0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libquadmath0:amd64.
Preparing to unpack .../libquadmath0_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libquadmath0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libgcc-5-dev:amd64.
Preparing to unpack .../libgcc-5-dev_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libgcc-5-dev:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package gcc-5.
Preparing to unpack .../gcc-5_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking gcc-5 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package gcc.
Preparing to unpack .../gcc_4%3a5.3.1-1ubuntu1_amd64.deb ...
Unpacking gcc (4:5.3.1-1ubuntu1) ...
Selecting previously unselected package libstdc++-5-dev:amd64.
Preparing to unpack .../libstdc++-5-dev_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libstdc++-5-dev:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package g++-5.
Preparing to unpack .../g++-5_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking g++-5 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package g++.
Preparing to unpack .../g++_4%3a5.3.1-1ubuntu1_amd64.deb ...
Unpacking g++ (4:5.3.1-1ubuntu1) ...
Selecting previously unselected package make.
Preparing to unpack .../archives/make_4.1-6_amd64.deb ...
Unpacking make (4.1-6) ...
Selecting previously unselected package libdpkg-perl.
Preparing to unpack .../libdpkg-perl_1.18.4ubuntu1.5_all.deb ...
Unpacking libdpkg-perl (1.18.4ubuntu1.5) ...
Selecting previously unselected package dpkg-dev.
Preparing to unpack .../dpkg-dev_1.18.4ubuntu1.5_all.deb ...
Unpacking dpkg-dev (1.18.4ubuntu1.5) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../build-essential_12.1ubuntu2_amd64.deb ...
Unpacking build-essential (12.1ubuntu2) ...
Selecting previously unselected package libfakeroot:amd64.
Preparing to unpack .../libfakeroot_1.20.2-1ubuntu1_amd64.deb ...
Unpacking libfakeroot:amd64 (1.20.2-1ubuntu1) ...
Selecting previously unselected package fakeroot.
Preparing to unpack .../fakeroot_1.20.2-1ubuntu1_amd64.deb ...
Unpacking fakeroot (1.20.2-1ubuntu1) ...
Selecting previously unselected package libalgorithm-diff-perl.
Preparing to unpack .../libalgorithm-diff-perl_1.19.03-1_all.deb ...
Unpacking libalgorithm-diff-perl (1.19.03-1) ...
Selecting previously unselected package libalgorithm-diff-xs-perl.
Preparing to unpack .../libalgorithm-diff-xs-perl_0.04-4build1_amd64.deb ...
Unpacking libalgorithm-diff-xs-perl (0.04-4build1) ...
Selecting previously unselected package libalgorithm-merge-perl.
Preparing to unpack .../libalgorithm-merge-perl_0.08-3_all.deb ...
Unpacking libalgorithm-merge-perl (0.08-3) ...
Selecting previously unselected package libfile-fcntllock-perl.
Preparing to unpack .../libfile-fcntllock-perl_0.22-3_amd64.deb ...
Unpacking libfile-fcntllock-perl (0.22-3) ...
Selecting previously unselected package manpages-dev.
Preparing to unpack .../manpages-dev_4.04-2_all.deb ...
Unpacking manpages-dev (4.04-2) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libpython2.7-stdlib:amd64 (2.7.12-1ubuntu0~16.04.4) ...
Setting up python2.7 (2.7.12-1ubuntu0~16.04.4) ...
Setting up libpython-stdlib:amd64 (2.7.12-1~16.04) ...
Setting up python (2.7.12-1~16.04) ...
Setting up libmpc3:amd64 (1.0.3-1) ...
Setting up binutils (2.26.1-1ubuntu1~16.04.8) ...
Setting up libc-dev-bin (2.23-0ubuntu11) ...
Setting up linux-libc-dev:amd64 (4.4.0-143.169) ...
Setting up libc6-dev:amd64 (2.23-0ubuntu11) ...
Setting up libisl15:amd64 (0.16.1-1) ...
Setting up cpp-5 (5.4.0-6ubuntu1~16.04.11) ...
Setting up cpp (4:5.3.1-1ubuntu1) ...
Setting up libcc1-0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libgomp1:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libitm1:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libatomic1:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libasan2:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up liblsan0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libtsan0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libubsan0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libcilkrts5:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libmpx0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libquadmath0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libgcc-5-dev:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up gcc-5 (5.4.0-6ubuntu1~16.04.11) ...
Setting up gcc (4:5.3.1-1ubuntu1) ...
Setting up libstdc++-5-dev:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up g++-5 (5.4.0-6ubuntu1~16.04.11) ...
Setting up g++ (4:5.3.1-1ubuntu1) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up make (4.1-6) ...
Setting up libdpkg-perl (1.18.4ubuntu1.5) ...
Setting up dpkg-dev (1.18.4ubuntu1.5) ...
Setting up build-essential (12.1ubuntu2) ...
Setting up libfakeroot:amd64 (1.20.2-1ubuntu1) ...
Setting up fakeroot (1.20.2-1ubuntu1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Setting up libalgorithm-diff-perl (1.19.03-1) ...
Setting up libalgorithm-diff-xs-perl (0.04-4build1) ...
Setting up libalgorithm-merge-perl (0.08-3) ...
Setting up libfile-fcntllock-perl (0.22-3) ...
Setting up manpages-dev (4.04-2) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
root@Ubuntu16:~#
root@Ubuntu16:~# curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

## Installing the NodeSource Node.js 10.x repo...

## Populating apt-get cache...

+ apt-get update
Hit:1 http://repo.zabbix.com/zabbix/4.0/ubuntu xenial InRelease
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Hit:3 http://au.archive.ubuntu.com/ubuntu xenial InRelease
Hit:4 http://au.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:5 http://au.archive.ubuntu.com/ubuntu xenial-backports InRelease
Fetched 109 kB in 3s (28.3 kB/s)
Reading package lists... Done

## Confirming "xenial" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_10.x/dists/xenial/Release'

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
OK

## Creating apt sources list file for the NodeSource Node.js 10.x repo...

+ echo 'deb https://deb.nodesource.com/node_10.x xenial main' > /etc/apt/sources.list.d/nodesource.list
+ echo 'deb-src https://deb.nodesource.com/node_10.x xenial main' >> /etc/apt/sources.list.d/nodesource.list

## Running `apt-get update` for you...

+ apt-get update
Get:1 https://deb.nodesource.com/node_10.x xenial InRelease [4,584 B]
Hit:2 http://repo.zabbix.com/zabbix/4.0/ubuntu xenial InRelease
Get:3 https://deb.nodesource.com/node_10.x xenial/main amd64 Packages [767 B]
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:5 http://au.archive.ubuntu.com/ubuntu xenial InRelease
Hit:6 http://au.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:7 http://au.archive.ubuntu.com/ubuntu xenial-backports InRelease
Fetched 5,351 B in 1s (3,002 B/s)
Reading package lists... Done

## Run `sudo apt-get install -y nodejs` to install Node.js 10.x and npm
## You may also need development tools to build native addons:
     sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
     curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
     echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
     sudo apt-get update && sudo apt-get install yarn
mildsunrise commented 5 years ago

I've tried to reproduce your problem (but on an Ubuntu 16.04 container, not a VM) using your steps:

apt install -y make python build-essential curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - npm -v <---(confirmed none installed) node -v <---(confirmed none installed) apt-get install nodejs npm -v node -v git clone https://github.com/botgram/shell-bot.git && cd shell-bot npm install

And it works correctly :thinking:

root@467e298f1d3b:~# npm -v
6.4.1
root@467e298f1d3b:~# node -v
v10.15.3
root@467e298f1d3b:~# git clone https://github.com/botgram/shell-bot.git && cd shell-bot
Cloning into 'shell-bot'...
remote: Enumerating objects: 153, done.
remote: Counting objects: 100% (153/153), done.
remote: Compressing objects: 100% (77/77), done.
remote: Total 264 (delta 79), reused 146 (delta 76), pack-reused 111
Receiving objects: 100% (264/264), 76.51 KiB | 0 bytes/s, done.
Resolving deltas: 100% (166/166), done.
Checking connectivity... done.
root@467e298f1d3b:~/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
[...]

So I'm pretty lost for options. It seems npm isn't correctly extracting the packages... you could try to npm install --ignore-scripts and see if at least you node-pty exists and you can run node scripts/install.js there manually.

davros123 commented 5 years ago

Thanks. I am running on ESXI 6 as a VM but it should not matter. I get the same error on Ubuntu 16.04 Desktop and Server editions. I also tried Ubuntu 18 server and got the same error :(

npm ERR! Linux 4.15.0-46-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
root@server18s:~/shell-bot#
davros123 commented 5 years ago

ok. I think I have identified the issue! I was running these as root. Running as user worked! YAY!

git clone https://github.com/botgram/shell-bot.git && cd shell-bot
npm install
mildsunrise commented 5 years ago

I thought about that, but I also ran them as root at my container and everything was good :thinking: Anyway, glad it works for you :)

vaibhavchopra8 commented 3 years ago

API TOKEN