Skip to content

Commit

Permalink
Add help text for Node.js snap failures
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lovell committed Dec 11, 2023
1 parent 25164d4 commit 9e3b021
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/sharp.js
Expand Up @@ -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:',
Expand Down

0 comments on commit 9e3b021

Please sign in to comment.