Closed fdciabdul closed 4 years ago
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 puppeteer@3.1.0: wanted: {"node":">=10.18.1"} (curreloadDep:ws → addNameRange ▌ ╢███████████░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine extract-zip@2.0.0: wanted: {"node":">= 10.12.0"} (cu
> puppeteer@3.1.0 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/moduleraid@4.1.0 ├── jsqr@1.3.1
└── mime@2.4.5
npm WARN enoent ENOENT: no such file or directory, open '/root/wabot/package.json'
npm WARN ws@7.3.0 requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN ws@7.3.0 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
> puppeteer@3.1.0 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 ws@7.3.0 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.3.0 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.
+ whatsapp-web.js@1.6.0
added 46 packages from 74 contributors and audited 49 packages in 9.798s
found 0 vulnerabilities
how to fix it ?