Troubleshooting
Incompatible dependencies when upgrading Node.js
You may encounter issues with incompatible dependencies when upgrading Node.js (eg from version 20 to 21),
especially if the dependencies have native compiled binding. This is a common issue with canvas package
where you can get error message like this:
[pavel|~/Work/Fry-IT/e2e.practique] (release/8.11 $) npm run test features/zendesk-chat/zendesk_chat.feature
> @fry-it/e2e.practique@1.0.1 test
> NODE_OPTIONS="--loader ts-node/esm --no-warnings" cucumber-js features/zendesk-chat/zendesk_chat.feature
Error: The module '/Users/pavel/Work/Fry-IT/e2e.practique/node_modules/canvas/build/Release/canvas.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 115. This version of Node.js requires
NODE_MODULE_VERSION 120. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at Module._extensions..node (node:internal/modules/cjs/loader:1473:18)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object.<anonymous> (/Users/pavel/Work/Fry-IT/e2e.practique/node_modules/canvas/lib/bindings.js:3:18)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12) {
code: 'ERR_DLOPEN_FAILED'
}
In order to fix this issue, you need to recompile the native bindings for the package. You can do this
using npm rebuild canvas --update-binary command which should have following output:
[pavel|~/Work/Fry-IT/e2e.practique] (release/8.11 *$) npm rebuild canvas --rebuild-binary
rebuilt dependencies successfully
Unable to push to GIT
If you are trying to push to GIT a larger number of files with larger sizes you may encounter a cryptic error:
error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
This is due to size limit of the push which is set on your system or was set by default. To change the global size limit run following command which sets limit to 150MB:
git config --global http.postBuffer 157286400
This should be really not necessary and should be avoided. If it must be done, it’s recommended to put it back to default, which is 1MB chunk.
Outdated Playwright browsers
When you perform npm upgrade or even npm install and the Playwright has been
updated, most likely you receive following error message when trying to run the tests:
Copy paste the output when it happens again
To fix the issue just follow the instructions and use npx playwright install which
will download the latest Playwright browsers onto your system.