whatsapp-web.js
whatsapp-web.js copied to clipboard
Upgrade node version
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]
I think node v16 gives us a little more time to the next upgrade
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
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
I wonder why the library supports old version
I wonder why the library supports old version
Because the last version of ubuntu would install node v12 on apt install nodejs
I think node v16 gives us a little more time to the next upgrade
Sort of... v16 will be reaching EOL in 5 months
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.
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
13 Puppetmaster has stopped working properly.
Some files are not loading.
With Puppeteer 18.2.1 files are loaded successfully. I will be switching
Warnings: Win7 only supports node 13
Warnings: Win7 only supports node 13
Well, we could always add a note about that 🤷 I wouldn't be that concerned, though
up
how to use this newly pushed code?
how to use this newly pushed code?
do npm install github:pedroslopez/whatsapp-web.js#webpack-exodus in your path project