-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
Luarocks Issues Thread #1342
Comments
I use lazy and |
Nope, you don't need the Yeah, sometimes manually rerunning the build steps is what fixes it. Lazy is very unpredictable when it comes to build steps 🤷♂️ |
For those who are on Arch Linux and seeing a build error similar to... ❌ Performing luarocks `./configure` if Unix systems
...hare/nvim/lazy/luarocks.nvim/lua/luarocks-nvim/build.lua:126: Failed to install luarocks:
Configuring LuaRocks version dev...
Lua interpreter found: /sbin/luajit
Checking if /sbin/luajit is Lua version 5.1... yes
lua.h for Lua 5.1 not found (tried //include/lua/5.1/lua.h //include/lua5.1/lua.h //include/lua-5.1/lua.h //include/lua51/lua.h //include/lua.h //include/luajit-2.1/lua.h)
If the development files for Lua (headers and libraries)
are installed in your system, you may need to use the
--with-lua or --with-lua-include flags to specify their location.
If those files are not yet installed, you need to install
them using the appropriate method for your operating system.
Run ./configure --help for details on flags.
configure failed. change your luarocks.nvim config as follows. {
"vhyrro/luarocks.nvim",
opts = {
luarocks_build_args = {
"--with-lua-include=/usr/include",
},
},
} |
I'm trying to install it with the lazy method but I keep getting an error and neorg won't load: Failed to run `config` for neorg
.../lazy/neorg/lua/neorg/modules/core/highlights/module.lua:433: module 'nvim-treesitter.query' not found:No LuaRocks module found for nv
im-treesitter.query
^Ino field package.preload['nvim-treesitter.query']
cache_loader: module nvim-treesitter.query not found
cache_loader_lib: module nvim-treesitter.query not found
^Ino file './nvim-treesitter/query.lua'
^Ino file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1/nvim-treesitter/query.lua'
^Ino file '/usr/local/share/lua/5.1/nvim-treesitter/query.lua'
^Ino file '/usr/local/share/lua/5.1/nvim-treesitter/query/init.lua'
^Ino file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/nvim-treesitter/query.lua'
^Ino file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/nvim-treesitter/query/init.lua'
^Ino file '/home/simon/.local/share/nvim/lazy/luarocks.nvim/.rocks/share/lua/5.1/nvim-treesitter/query.lua'
^Ino file '/home/simon/.local/share/nvim/lazy/luarocks.nvim/.rocks/share/lua/5.1/nvim-treesitter/query/init.lua'
^Ino file '/home/simon/.luarocks/share/lua/5.1/nvim-treesitter/query.lua'
^Ino file '/home/simon/.luarocks/share/lua/5.1/nvim-treesitter/query/init.lua'
^Ino file './nvim-treesitter/query.so'
^Ino file '/usr/local/lib/lua/5.1/nvim-treesitter/query.so'
^Ino file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/nvim-treesitter/query.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'
^Ino file '/home/simon/.local/share/nvim/lazy/luarocks.nvim/.rocks/lib/lua/5.1/nvim-treesitter/query.so'
^Ino file '/home/simon/.luarocks/lib/lua/5.1/nvim-treesitter/query.so'
^Ino file './nvim-treesitter.so'
^Ino file '/usr/local/lib/lua/5.1/nvim-treesitter.so'
^Ino file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/nvim-treesitter.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'
^Ino file '/home/simon/.local/share/nvim/lazy/luarocks.nvim/.rocks/lib/lua/5.1/nvim-treesitter.so'
^Ino file '/home/simon/.luarocks/lib/lua/5.1/nvim-treesitter.so'
# stacktrace:
- /neorg/lua/neorg/modules/core/highlights/module.lua:433 _in_ **trigger_highlights**
- /neorg/lua/neorg/modules/core/highlights/module.lua:420 _in_ **load**
- /neorg/lua/neorg/core/modules.lua:403 _in_ **load_module**
- /neorg/lua/neorg/core/modules.lua:335 _in_ **load_module** |
@simonhughxyz The error message is slightly different as we're using the luarocks package loader, but the underlying cause looks to be the same - Neorg is trying to initialize before treesitter is activated. Maybe try: {
"nvim-neorg/neorg",
dependencies = { "luarocks.nvim", "nvim-treesitter" }, -- Add nvim-treesitter here
} Just for good measure? I'll be revamping that part of the code fairly soon anyway, but it's worth a shot. |
This fix did not work |
Okay, I tried another thing. @simonhughxyz mind updating the plugin and trying again? I removed the old and hacky code related to nvim-treesitter query invalidation, which has been resolved for a while now. |
No sorry, updated all plugin, still did not work. Tried deleting my nvim data folder as well just in case, did not resolve anything. |
That's odd... are you pinned to the latest stable release by any chance? I pushed the update to the main branch. If so, my bad, I should have made that clear. I quite literally removed the old code that cause the error, so it continuing to trigger is quite suspicious 😅 |
Yea, just checked lazy, it says its on commit |
Oh hang on, my bad, I had |
Ok, so the latest commit got rid of the error, but neorg still will not load |
I assume then that it's silently failing to load? All of the people that have mentioned such an error have had their issues resolved via As I mentioned before, lazy has a notoriously weird set of build procedures. |
Ok so I fixed it, it just needs 2 dependancies |
@roland-5 The workaround will be officially supported so you don't need to add the line in your config anymore. (Obviously adding |
I've just migrated following Adapting your config section, so far so good. |
I might just add, if you are using fedora, make sure you have installed compat-lua-devel-5.1.5
The with-lua flag is not necessary since it is installed in a default directory. Then you do Hope that helps, I was just frustrated searching for the package. |
if you get an issue similar to this on ubuntu based distros, you need to install the |
Hello, noob question: how do I see the build errors in Lazy? I'm getting the "Performing luarocks Thanks |
@dearieme |
@pysan3 Thank you, I'm sure I knew that once :) I'm on Arch and the error suggested that lua 5.1 was explicitly required, so I installed"extra/lua51" ("extra/lua" was already installed but didn't conflict) re-did the Lazy build dance, and it all seems to work fine now. |
I had strange errors with wget when trying to |
I was unable to install Neorg v8 with lazy.nvim with the blog post fix here: in the readme, it says:
But for me, it didn't install the dependencies I had to explicitly add these as dependencies to install Neorg v8: {
"vhyrro/luarocks.nvim",
+ dependencies = {
+ "MunifTanjim/nui.nvim",
+ "nvim-neotest/nvim-nio",
+ "nvim-neorg/lua-utils.nvim",
+ "nvim-lua/plenary.nvim"
+ },
priority = 1000, -- We'd like this plugin to load first out of the rest
config = true, -- This automatically runs `require("luarocks-nvim").setup()`
}, Could you please update your blog post to add these in case someone had the same problem as me? |
I think the nixpkgs overlay flake is going to need an update. On a fresh system I was able to install without warnings but most of neorgs functionality is missing so I think it is in a bad state. |
The configure script currently doesn't detect lua headers if lua is installed by Homebrew, because they're located in |
Also, for some reason, it tries to find the headers for lua 5.1, which has been deprecated |
What's working for me currently on Nix with extraLuaPackages = luaPkgs: with luaPkgs; [lua-utils-nvim nvim-nio pathlib-nvim]; Telescope is still half-broken, but I assume that's nvim-neorg/neorg-telescope#57. |
@morrismuehl I was able to get rocks working with home-manager by adding Why do the instructions advise setting |
Credits to @benlubas for the nix section ;) @maxdiebold If you lazy load, you cannot get command completions on the first try (like However, core devs will only support issues that happen with |
@pysan3 I've found that I can still get the completions on the first try by setting |
Nothing in this thread or in any resource I found helped me to install on current Lunar Vim stable (Neovim 0.9.0). |
Hey there. I've switched from paq to rocks with neorg 8.4.0.
I also dumped nvim-treesitter in favor of rocks-treesitter.nvim. Is neorg still dependent on nvim-treesitter? |
This did the trick for me using the "lazy kickstart" |
I currently use nixvim in home-manager to manage my neorg config under nixos, and I always get the following warning:
My neorg.nix file looks like this: {pkgs, ...}: {
programs.nixvim = {
plugins = {
neorg = {
enable = true;
modules = {
"core.defaults".__empty = null;
"core.concealer" = {
config = {
icon_preset = "basic";
};
};
"core.dirman" = {
config = {
workspaces = {
notes = "~/Documents/notes";
};
default_workspace = "notes";
};
};
};
};
};
extraLuaPackages = with pkgs.luaPackages; [
lua-utils-nvim
nvim-nio
pathlib-nvim
];
};
} I followed @austinbutler comment to add the three packages to And whenever I am running
Treesitter is for sure enabled and works fine, but something is messed up in nixvim. |
@arunoruto I also use {
pkgs,
config,
lib,
...
}: let
cfg = config.nixvim.neorg;
in
with lib; {
options = {
nixvim = {
neorg = {
enable = mkEnableOption "Enable neorg for nixvim" // {default = true;};
};
};
};
config = mkIf (config.nixvim.enable && cfg.enable) {
programs = {
nixvim = {
extraPlugins = with pkgs.vimPlugins; [neorg neorg-telescope];
extraConfigLuaPost =
/*
lua
*/
''
require("neorg").setup {
load = {
["core.defaults"] = {}
}
}
'';
};
};
};
} |
First time installing neorg here and I seem to be getting the same issue as a few people in this thread. I followed the instructions for Lazy.nvim and everything appears to install correctly, but every time I start nvim, I get:
Unfortunately the suggested build commands do not help. I'm running Arch Linux. |
@kjkent Do you have system dependencies installed? https://github.com/pysan3/Norg-Tutorial/blob/main/MIGRATION-v8.md#install-system-dependencies |
Edit for the sake of it, I just cleared my neorg/luarocks files, followed the tutorial again and it worked? I... I don't know. Perhaps I missed a |
Hi If anyone has managed to get it to work on Nixvim, would appreciate comments on how the managed it! |
See here: #1342 (comment) |
I don't quite follow your solution, adding your configuration is not really working for me `
` |
This is a minimal module without custom options: {pkgs, ...}: {
programs = {
nixvim = {
enable = true;
extraPlugins = with pkgs.vimPlugins; [neorg neorg-telescope];
extraConfigLuaPost = ''
require("neorg").setup {
load = {
["core.defaults"] = {},
},
}
'';
};
};
} Note that this uses the mentioned overlay. To use it, you have to first be using flakes, and then add it as a flake input in your |
Thank you for your support and help, you helped me learn something new. I was not aware that under a home-manager set up I had to import the overlay directly on my home.nix ( my file structure is something like: flake.nix that imports configuration.nix (os) and in turn configuration.nix imports home.nix (home-manager)). In essence by adding the overlay to home-manager solved the issue and I now have Neorg in my Nixvim configuration using the overlay! Thank you! |
Yeah, you can either import the overlay in |
It turns out that if anything is "wrong" with
Fixing up the edit: I noticed kinda late that |
This works!! if on nixos, using flakes and home-manager, this solved my issues. |
After following all steps and troubleshooting steps, and rebuilding neorg multiple times, I keep having this error on checkhealth:
luarocks.nvim is installed correctly, and returns positively on a |
b/c |
Right. Which is odd because this is my config:
|
Well that config works perfectly fine for me, so you must have something else going on. If you push your changes to github, I can poke around. The config on github right now has "core.neorg.dirman" |
Ah. The issue was caused by a conflict between two different configs, one of which referenced dirman incorrectly. Neorg is all good now. Thank you! |
In case it's helpful to anyone, mise can be used to install lua 5.1 with luarocks: mise plugins add lua
mise use -g [email protected] after which |
With lazy and lunarvim (lvim, nvim: v0.10.0) I had to first install liblua:
Then add: table.insert(lvim.plugins, {
"vhyrro/luarocks.nvim",
priority = 1000, -- We'd like this plugin to load first out of the rest
config = true, -- This automatically runs `require("luarocks-nvim").setup()`
dependencies = {
"MunifTanjim/nui.nvim",
"nvim-neotest/nvim-nio",
"nvim-neorg/lua-utils.nvim",
"nvim-lua/plenary.nvim",
"pysan3/pathlib.nvim",
},
})
table.insert(lvim.plugins, {
"nvim-neorg/neorg",
lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default
version = "*", -- Pin Neorg to the latest stable release
-- config = true,
dependencies = { "luarocks.nvim" },
config = function()
require("neorg").setup({
-- put any of your previous config here
})
end,
}) To |
I also had the bug of lua-utils not found, because I used a newer version of Neorg with a previous version of Lazy. Neorg again updated how to install it with Lazy (I wish the maintainer kept things simple. KISS is by far the most important principle in programming) We now need to update Lazy itself, Neorg and the configuration (no need to have luarocks as a dependency) https://github.com/nvim-neorg/neorg?tab=readme-ov-file#lazynvim. I wish I don't have to spend 1 hour again at work debugging my neorg installation :) |
If you're probably here you're either angry or you're sad :|
The latest update,
8.0.0
, has been a breaking change for users. This isn't a breaking change just because I felt like it, rather it paves the way forward for making Neorg expansive and more stable than it was before. We just need to jump through the initial hurdles.If you have issues, please read the blog post I made. It will have you covered on how to fix things.
If you don't want to deal with the breakages, feel free to roll back to version
v7.0.0
- everything will continue to run there.If you're having errors in lazy, I highly encourage you to restart Neovim and try manually rerunning
:Lazy build luarocks.nvim
and, if that succeeds, running:Lazy build neorg
afterwards. If you get any errors which you do not understand, please post them here!Thank you lot for the patience! Happy note taking.
EDIT:
If you have a
build = ":Neorg sync-parsers"
step in your Neorg configuration be sure to remove it. That'll overwrite thebuild.lua
build step and make the build process fail.The text was updated successfully, but these errors were encountered: