Add help text for Node.js snap failures

The official Node.js Snap as distributed via the Ubuntu Snap Store
does not provide support for native modules.

Sometimes, if the version of the core matches the version of the
underlying OS, then it will appear to work.

There are quite a few open issues relating to this in the
nodejs/snap repo.
This commit is contained in:
Lovell Fuller 2023-12-11 22:56:48 +00:00
parent 25164d4cef
commit 9e3b021b1a

View File

@ -77,6 +77,12 @@ if (sharp) {
);
} catch (errEngines) {}
}
if (isLinux && /\/snap\/core[0-9]{2}/.test(messages)) {
help.push(
'- Remove the Node.js Snap, which does not support native modules',
' snap remove node'
);
}
if (isMacOs && /Incompatible library version/.test(messages)) {
help.push(
'- Update Homebrew:',