how to fix it ?
# npm i whatsapp-web.js
loadDep:puppeteer โ resol โ โขโโโโโโโโโโโโโโโโโโโโโโโโ
WARN engine [email protected]: wanted: {"node":">=10.18.
> [email protected] install /root/wabot/node_modules/whatsapp-web.js/node_modules/puppeteer
> node install.js
/root/wabot/node_modules/whatsapp-web.js/node_modules/puppeteer/install.js:175
} catch {
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
[email protected] /root/wabot
โโโ [email protected] extraneous
โโโ [email protected] extraneous
npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none was installed.
npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none was installed.
npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none was installed.
npm WARN [email protected] No repository field.
npm ERR! Linux 4.15.0-96-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i" "whatsapp-web.js"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node 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 puppeteer package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs puppeteer
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls puppeteer
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /root/wabot/npm-debug.log
Try deleting your node_modules folder and the package-lock.json
Try deleting your node_modules folder and the package-lock.json
same
# ls
1.txt CoronaService index.js Quran.js shrinkwrap.yaml 2.txt Diagram.png npm-debug.log README.md user.js
root@vultr:~/wabot# npm i whatsapp-web.js loadDep:puppeteer โ resol โ โขโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
WARN engine [email protected]: wanted: {"node":">=10.18.1"} (curreloadDep:ws โ addNameRange โ โขโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
WARN engine [email protected]: wanted: {"node":">= 10.12.0"} (cu
> [email protected] install /root/wabot/node_modules/puppeteer
> node install.js
/root/wabot/node_modules/puppeteer/install.js:175
} catch {
^
SyntaxError: Unexpected token { at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10) at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3 /root/wabot
โโโ @pedroslopez/[email protected] โโโ [email protected]
โโโ [email protected]
npm WARN enoent ENOENT: no such file or directory, open '/root/wabot/package.json'
npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none was installed.
npm WARN wabot No description
npm WARN wabot No repository field.
npm WARN wabot No README data
What version of nodejs are you using? Check by running node -v

it showing v.8.10.0
it showing v.8.10.0
Puppeteer requires v10.18.1+. Please update your node installation and you should be good to go!
thanks , now is working fine to me
root@vultr:~# nvm install 10.15.3
Downloading and installing node v10.15.3...
Downloading https://nodejs.org/dist/v10.15.3/node-v10.15.3-linux-x64.tar.xz...
################################################################################# 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v10.15.3 (npm v6.4.1)
Creating default alias: default -> 10.15.3 (-> v10.15.3)
root@vultr:~# node -v
v10.15.3
root@vultr:~# cd wabot
root@vultr:~/wabot# npm i whatsapp-web.js
> [email protected] install /root/wabot/node_modules/puppeteer
> node install.js
(node:9390) ExperimentalWarning: The fs.promises API is experimental
Downloading Chromium r756035 - 125.2 Mb [=================] 100% 0.0s
Chromium (756035) downloaded to /root/wabot/node_modules/puppeteer/.local-chromium/linux-756035
npm WARN saveError ENOENT: no such file or directory, open '/root/wabot/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/root/wabot/package.json'
npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN wabot No description
npm WARN wabot No repository field.
npm WARN wabot No README data
npm WARN wabot No license field.
+ [email protected]
added 46 packages from 74 contributors and audited 49 packages in 9.798s
found 0 vulnerabilities
Most helpful comment
thanks , now is working fine to me