-
-
Notifications
You must be signed in to change notification settings - Fork 199
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 |
@leongjs98 I don't think you have it setup correctly if you need those lines. |
@flexagoon You will need lua version 5.1 installed or luajit is even better. I don't use brew so I'm not sure about the actual package name but if you install it, luarocks build script should be able to pick it up. FYI lua5.1 is not deprecated or there is a problem with your package manager. You might want to read |
I changed my nix config to not use hm, essentially to the snippet that you provided in the manual. Neorg works now (albeit somewhat unreliably), but I am no longer running the nightly version of neovim. If I understood correctly you are running nightly so I don't really understand why. Any idea what the problem is, or where I could look for help? |
@moebiusband73 everything continues to just work if you pin to version 7 and wait for us to resolve the issues :)
This is untrue for many reasons. The most obvious being that we version everything. If the setup is not running on your end, that's lazy deciding not to run the build script, not us. Hence it's not Neorg being fragile. Luarocks isn't something new at all, it has been around for a long while (even during the packer days). Furthermore, it's far from a one-man show. There are now several dozens of plugins (including basically all of the most popular ones) on luarocks. If my memory serves me right four new ones landed in the mainline repository just yesterday. Those plugins can afford to keep backwards-compatibility, and that's awesome. If Neorg could provide perfect compatibility, it would, but as you can see from the blog posts, it simply can't :p I understand that things "just working" and ease of use/debugging is of high priority, and that's exactly what I'm working towards with all of this. I'll also be looking at lazy to see if I can make the build logic more consistent (perhaps folke will be kind enough to look into himself, he's the wizard after all). I'm exclusively dedicating developer time to make the whole experience not just on par with what we had before, but better than what we had before. I'll be conjuring up kickstart configurations which get you started with an immediate working version of Neorg as well as guides. Neorg is not your average "minimal, markdown based note taking tool" Neovim plugin. Testing the limits of what's possible is a part of what we do. Hope that clears things up, feel free to ask about anything if you need further answers :) |
As for everyone else who might be having Neorg problems, sorry, I've been away for the past four days. I'll be looking into all of your issues and making some parts easier to debug. I just made the checkhealth more advanced which is a good start :) |
Yup I'm running nightly, the snippet in the tutorial is slightly simplified from my actual setup. I build nightly from source, I specify the source as an input to my system flake and then pass it as the source to defining the input What do you mean by "somewhat unreliably"? cc @morrismuehl |
I understood Neorg should be the generic format to support basically any notetaking situation. But why then put it into one probably more and more complex plugin and not split it up. Have a basic plugin with just the essential functionality, and then add other plugins with the more fancy stuff. This would not make users hostage of adding new features they are not interested in. I am not sure if I am the only one, but I just need a simple note taking format with a robust syntax, good syntax highlighting, linking between notes, good native Telescope integration, and nice conceal support. Thats it, all the other fancy things: Don't need it. So testing the limits of whats possible is not one of my requirements :-). Btw before I used Telekasten which can do most of that. Maybe one can support neorg files there. So thanks for clarifying, I guess Neorg is just not for me. A pity, I liked the syntax. Maybe I fork it ;-), or is there already a fork with less ambitious aims? |
AFAIK Neorg is currently undergoing a refactor and migrating to a client-server architecture, so most of the features will be handled by the Norgopolis server, not the nvim plugin. This means it'll be much easier to build whatever plugin you want on top of norg instead of Neorg |
If you still can't make it to work, paste your error message here. |
Thanks again, I am not using flakes yet but I might look into it if I find the time. "Unreliably" meant, sometimes it works, sometimes it doesn't. I can execute commands but markup doesn't work and neither does following links. But I am not sure whether that has anything to do with Neorg itself. VimTeX stopped working on me today and all sorts of plugins started misbehaving ever since adopting that config (even just highlighting in *.nix files started becoming super janky). I'll revert to my old config with Neorg 7.0 for now. |
Has anyone gotten luarocks and by extension Neorg working on Windows? I tried to help my friend install it there, but in the end |
@LonelyMusicDisc we've had a decent chunk of windows testers and it should work as expected there. Did your friend have lua installed on their system with something like LuaForWindows as stated in the luarocks.nvim readme? As always make sure to |
@morrismuehl if you're on the latest neovim nightly releases then I have heard that parts of treesitter have started acting up, do note that just in case. There's nothing in Neorg that can break only sometimes - our checks either fail completely or don't fail whatsoever. If something fails Neorg will be sure to issue a warning or error message, so be sure to check your error logs! Also, make sure you're on the latest stable release of Neorg and run |
So I fixed his install and learned that installing lua-for-windows on scoop does not work the same as installing lua-for-windows normally, do not use scoop! |
Perhaps winget should be officially recommended in our readme, I recall that working when I was doing tests on a VM :) |
Is there a way I can use my existing installation of luarocks on my system (archlinux) with lazy.nvim? Or installing directly with luarocks? I really don't love the idea of using another plugin that builds a new installation of luarocks when I already have luarocks installed. And I don't really want to switch to a new package manager either, espeically since rocks.nvim is missiong functionality that lazy.nvim has (such as configuring a plugin to lazily load on certain key mappings or commands, semantic versioning for git repo tags, etc.) |
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) |
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: