whatsapp-web.js icon indicating copy to clipboard operation
whatsapp-web.js copied to clipboard

Upgrade node version

Open tuyuribr opened this issue 1 year ago • 12 comments

PR Details

It's time to upgade the node version

Description

The latest ubuntu version, installs node v18. So we can upgrade node and the other dependencies

[https://packages.ubuntu.com/kinetic/nodejs]

Warnings

Win7 don't support node 18 ... (only up to 13)

Types of changes

  • [x] Dependency change
  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [x] Breaking change (fix or feature that would cause existing functionality to change)

TO DO

  • [ ] Quick steps for upgrade
  • [ ] Other dependencies update
  • [ ] User base test

Tested

Windows. Node v18.16.0. WaWeb 2.2326.10. [2023-06-24]

tuyuribr avatar Apr 09 '23 14:04 tuyuribr

I think node v16 gives us a little more time to the next upgrade

tuyuribr avatar Apr 09 '23 14:04 tuyuribr

Which puppeteer version should we choose? What are the breaking changes that we should avoid? I think we should upgrade to v18.2.1 https://github.com/puppeteer/puppeteer/tree/v18.2.1

tuyuribr avatar Apr 09 '23 14:04 tuyuribr

I think we should upgrade node-fetch to v2.6.9 (nice). We are in 2.6.5 so probably won't break a thing.

https://github.com/node-fetch/node-fetch/releases/tag/v2.6.9

tuyuribr avatar Apr 09 '23 14:04 tuyuribr

I wonder why the library supports old version

amosayomide05 avatar Apr 09 '23 15:04 amosayomide05

I wonder why the library supports old version

Because the last version of ubuntu would install node v12 on apt install nodejs

tuyuribr avatar Apr 09 '23 17:04 tuyuribr

I think node v16 gives us a little more time to the next upgrade

Sort of... v16 will be reaching EOL in 5 months

wictornogueira avatar Apr 10 '23 23:04 wictornogueira

I wonder why the library supports old version

Because the last version of ubuntu would install node v12 on apt install nodejs

Thanks for sharing this info and for working on this PR! ❤️ I must say, it's quite surprising to learn that the decision to maintain an obsolete version was driven by Ubuntu's default Node.js installation.

Relying on Ubuntu as the primary deployment method seems arbitrary, particularly since this is just one of the many ways one could deploy WWeb applications. Moreover, it appears we haven't documented this decision or provided any deployment guidance, which means only those who happen to be already deploying on Ubuntu would benefit from it.

To exemplify: When I deployed my first app, I turned to Puppeteer's guides for recommended deployment steps. My deployment process still follows one of their guides.

I wholeheartedly agree with the changes proposed in this PR. As a Node project, rather than an Ubuntu one, it's important that we adhere to Node's release schedule. Sticking to whatever is the Active LTS version at the time is standard practice and will help prevent the accumulation of technical debt.

zvictor avatar Jun 05 '23 12:06 zvictor

If you test this PR please include your node version ( node --version ), your system OS and the WaWeb version ( await client.getWWebVersion() ) Update your package.json to: git+https://github.com/pedroslopez/whatsapp-web.js#tuyuribr-patch-2 Don't forget to delete node_modules them npm i

tuyuribr avatar Jun 24 '23 04:06 tuyuribr

13 Puppetmaster has stopped working properly.

Some files are not loading.

With Puppeteer 18.2.1 files are loaded successfully. I will be switching

tofers avatar Jul 03 '23 19:07 tofers

Warnings: Win7 only supports node 13

tuyuribr avatar Aug 23 '23 13:08 tuyuribr

Warnings: Win7 only supports node 13

Well, we could always add a note about that 🤷 I wouldn't be that concerned, though

wictornogueira avatar Aug 23 '23 16:08 wictornogueira

up

diegofemello avatar Aug 24 '23 19:08 diegofemello

how to use this newly pushed code?

devagarwal007 avatar Apr 06 '24 14:04 devagarwal007

how to use this newly pushed code?

do npm install github:pedroslopez/whatsapp-web.js#webpack-exodus in your path project

washington65145as avatar Apr 17 '24 01:04 washington65145as