-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Language server: Cannot find module '@nomicfoundation/slang-linux-x64-gnu' #564
Comments
I debugged it a bit, and without going too much into the details, it looks like Whether this is a bug that's been finally fixed on the npm registry side or something's changed between Node.js 19.9 and Node.js 21.6, which we updated between the releases, I unfortunately do not know; I couldn't find any publishing-related changes in the diff between these versions. As to how we can solve this, I don't think we can mark these platform-specific npm packages/binaries as regular dependencies in package.json since a failure to install either of them would error out (failure is expected; only a single platform-specific package should match host OS/CPU setup), which would be incorrect. In this case, assuming that it's npm registry that has changed/fixed its behaviour, it's probably on node2nix to support this, if I understand the root issue correctly. (cc @svanderburg is that correct?) @beeb in the meantime, is it possible to patch this package during the build time to mark it as explicitly depending (in a package.json's Sorry for the trouble and I hope that at least the workaround works! |
Hey @Xanewok thanks a lot for the investigative work and explanation. I'll have a look at patching the node2nix package output although I have little experience doing so. If any nix wizard happens to read this, any input would be greatly appreciated! |
I managed to patch the install by modifying the generated let sources = {
# ...
"@nomicfoundation/slang-linux-x64-gnu-0.14.2" = {
name = "_at_nomicfoundation_slash_slang-linux-x64-gnu";
packageName = "@nomicfoundation/slang-linux-x64-gnu";
version = "0.14.2";
src = fetchurl {
url = "https://registry.npmjs.org/@nomicfoundation/slang-linux-x64-gnu/-/slang-linux-x64-gnu-0.14.2.tgz";
sha256 = "sha256-92JYoB9hL0BCZ4nKOcYdLE+a2wvxzt2kh2i6DRhfxKw=";
};
};
};
in
{
"@nomicfoundation/solidity-language-server" = nodeEnv.buildNodePackage {
# ...
dependencies = [
# ...
sources."@nomicfoundation/slang-linux-x64-gnu-0.14.2"
];
};
} Not pretty though, I didn't find a way to patch it without modifying the generated file, but I'm no expert. |
This seems to be fixed in the latest version! Thanks :) |
Hey there.
I've been using the language server with helix editor for quite some time, and recently wanted to upgrade to 0.8.x.
I have installed the npm packge through
nix
using node2nix which normally always works fine (and it did before the upgrade to 0.8).After the upgrade, I'm seeing the following error in helix's logs:
Platform: Ubuntu 23.10 x86-64
Note that when I check the installed package and its dependencies at
/nix/store/00rkpmpvbj91lkyvbsa5ydg49kq9y3dd-_at_nomicfoundation_slash_solidity-language-server-0.8.2/lib/node_modules/@nomicfoundation/solidity-language-server/node_modules/
, I cannot indeed see the@nomicfoundation/slang-linux-x64-gnu
package:The text was updated successfully, but these errors were encountered: