Skip to content

Cannot find luarocks to install treesitter modules #1809

Open

Description

@linguini1

Prerequisites

  • I am using the latest stable release of Neovim
  • I am using the latest version of the plugin

Neovim Version

NVIM v0.12.1 Build type: Release LuaJIT 2.1.1774638290

Neorg setup

        require("neorg").setup({
            load = {
                ["core.esupports.metagen"] = {
                    config = {
                        author = "Matteo Golin",
                    },
                },
                ["core.defaults"] = {},
                ["core.qol.toc"] = { config = { close_after_use = true } },
                ["core.completion"] = { config = { engine = "nvim-cmp" } },
                ["core.summary"] = {},
                ["core.concealer"] = { config = { icons = { code_block = { conceal = true, width = 80 } } } },
                ["core.export"] = {},
                ["core.looking-glass"] = {},
                ["core.presenter"] = { config = { zen_mode = "zen-mode" } },
                ["core.integrations.telescope"] = {},
                ["core.integrations.treesitter"] = {},
                ["core.ui"] = {},
                ["core.tempus"] = {},
                ["core.ui.calendar"] = {},
                ["core.export.markdown"] = { config = { extensions = "all" } },
                ["core.journal"] = {
                    config = {
                        journal_folder = "journo",
                    },
                },
                ["core.dirman"] = {
                    config = {
                        workspaces = {
                            junk = "~/notes/junk",
                            school = "~/notes/school",
                            projects = "~/notes/projects",
                            cuinspace = "~/notes/cuinspace",
                        },
                        default_workspace = "junk",
                    },
                },
                ["core.keybinds"] = {
                    config = {
                        hook = function(keybinds)
                            keybinds.remap_event("norg", "n", "<LocalLeader>z", "core.looking-glass.magnify-code-block")
                            keybinds.map("norg", "n", "<LocalLeader>p", "<Cmd>Neorg presenter start<CR>")
                            keybinds.map("norg", "n", "<leader>fnh", "<Cmd>Telescope neorg search_headers<CR>")
                            keybinds.map("norg", "n", "<leader>fnl", "<Cmd>Telescope neorg find_linkable<CR>")
                            keybinds.map("norg", "n", "<LocalLeader>il", "<Cmd>Telescope neorg insert_file_link<CR>")

                            keybinds.remap_event("norg", "n", "]l", "core.integrations.treesitter.next.link")
                            keybinds.remap_event("norg", "n", "[l", "core.integrations.treesitter.previous.link")
                            keybinds.remap_event("norg", "n", "]h", "core.integrations.treesitter.next.heading")
                            keybinds.remap_event("norg", "n", "[h", "core.integrations.treesitter.previous.heading")
                        end,
                    },
                },
            },
        })

Actual behavior

Image

This is the error I receive when I open Neovim. I have installed the Lua for Windows package and luarocks is on the system path and is executable. I am not sure why the build process cannot find it.

I have also tried the luarocks.nvim package, which fails with this mysterious error:

Unable to load the luarocks package loader. Try re-running the build stage (`:Lazy build luarocks.nvim`). Full trace: ...\lazy\luarocks.nvim\.rocks\lua\luarocks\core\persist.
lua:5: module 'dkjson' not found:
        no field package.preload['dkjson']
        cache_loader: module 'dkjson' not found
        cache_loader_lib: module 'dkjson' not found
        no file '.\dkjson.lua'
        no file 'C:\Program Files\Neovim\bin\lua\dkjson.lua'
        no file 'C:\Program Files\Neovim\bin\lua\dkjson\init.lua'
        no file 'C:\Program Files (x86)\Lua\5.1\lua\dkjson.luac'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/telescope.nvim/share/lua/5.1/dkjson.lua'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/telescope.nvim/share/lua/5.1/dkjson/init.lua'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/tree-sitter-norg/share/lua/5.1/dkjson.lua'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/tree-sitter-norg/share/lua/5.1/dkjson/init.lua'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/tree-sitter-norg-meta/share/lua/5.1/dkjson.lua'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/tree-sitter-norg-meta/share/lua/5.1/dkjson/init.lua'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/pathlib.nvim/share/lua/5.1/dkjson.lua'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/pathlib.nvim/share/lua/5.1/dkjson/init.lua'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/neorg/share/lua/5.1/dkjson.lua'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/neorg/share/lua/5.1/dkjson/init.lua'
        no file 'C:\Users\matte\AppData\Local\nvim-data\lazy\luarocks.nvim\.rocks\share\lua\5.1\dkjson.lua'
        no file 'C:\Users\matte\AppData\Local\nvim-data\lazy\luarocks.nvim\.rocks\share\lua\5.1\dkjson\init.lua'
        no file 'C:\Users\matte\AppData\Local\nvim-data\lazy\luarocks.nvim\.rocks\lua\dkjson.lua'
        no file 'C:\Users\matte\AppData\Local\nvim-data\lazy\luarocks.nvim\.rocks\lua\dkjson\init.lua'
        no file '.\dkjson.dll'
        no file 'C:\Program Files\Neovim\bin\dkjson.dll'
        no file 'C:\Program Files\Neovim\bin\loadall.dll'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/telescope.nvim/lib/lua/5.1/dkjson.dll'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/telescope.nvim/lib64/lua/5.1/dkjson.dll'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/tree-sitter-norg/lib/lua/5.1/dkjson.dll'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/tree-sitter-norg/lib64/lua/5.1/dkjson.dll'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/tree-sitter-norg-meta/lib/lua/5.1/dkjson.dll'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/tree-sitter-norg-meta/lib64/lua/5.1/dkjson.dll'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/pathlib.nvim/lib/lua/5.1/dkjson.dll'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/pathlib.nvim/lib64/lua/5.1/dkjson.dll'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/neorg/lib/lua/5.1/dkjson.dll'
        no file 'C:\Users\matte\AppData\Local\nvim-data/lazy-rocks/neorg/lib64/lua/5.1/dkjson.dll'
        no file 'C:\Users\matte\AppData\Local\nvim-data\lazy\luarocks.nvim\.rocks\lib\lua\5.1\dkjson.dll'

I did try rerunning the build, and also tried installing luarocks install dkjson to see if that would help. No luck.

Expected behavior

Tree sitter modules are installed and everything is fine!

This is new behaviour since updating Neovim packages.

Steps to reproduce

Open Neovim with the aforementioned Neorg setup and observe that Lazy fails to install the tree-sitter modules.

Potentially conflicting plugins

I think this is self-contained with Neorg's build process failing to obtain luarocks.

Other information

I am using Windows 11 on an ARM64 device. The Lua 5.1 interpreter is on the path, as is the luarocks install I got via Lua for Windows. I performed the install with all options checked (C libraries and headers included).

Help

No

Implementation help

No response

Activity

  1. added
    bugIssues related to bugs. Please attach a severity, a priority and category with this label.
    on Apr 12, 2026
  2. linguini1 commented on Jun 9, 2026

    @linguini1
    ContributorAuthor

    I fixed the dkjson problem by adding that to the rocks array, but the rest of the problem persists: luarocks cannot be spawned during the build of the treesitter modules.

    I ran checkhealth neorg and it says it can see luarocks just fine. No clue how to fix this.

  3. Ciliane commented on Jun 15, 2026

    @Ciliane

    I'm on windows, I had issues with the treesitter modules building after that update as well. Trying to solve all the issues I had trying to get neorg to work again was a bit hellish, but it's over now!

    There was actually a whole series of issues on the way to making it work. The problem described in this issue is the first step. lua-for-windows creates a luarocks.bat (or .cmd) in your path which then runs lua to run luarocks, and normally just entering luarocks in the terminal would find that bat file and execute it similarly to as if it was an exe, but the process spawn function that Lazy uses doesn't find that good enough and wants a luarocks.exe to be on your path specifically. What you should do is actually not use lua-for-windows anymore, because it ships an outdated version of luarocks that is too old for the version of .rockspec that norg treesitter modules are now using (3.0+). You can probably get it anywhere you want, I personally got it by installing lua, lua51 (you need to enable the versions bucket to get that) and luarocks Scoop packages. I also renamed the lua51 shims to lua5.1 because that's the name luarocks looks for when it's looking for that version. That version of luarocks happens to provide a luarocks.exe so that also works for solving the very first issue, but if you get it from somewhere else and it only has a .bat or .cmd, you can use this to make a shim https://github.com/ScoopInstaller/Shim

    The solution to the first problem I tried first was to just make a shim to the luarocks.bat that was provided by lua-for-windows. That solved the problem with Lazy not being able to find luarocks, but it runs into a problem that is very sneaky and lacking obvious cause. Build cyclically fails with an error that doesn't tell you much ("nvim-data/lazy/lazy-rocks/tree-sitter-norg/lua/5.1/whatever-i-forgot command doesn't exist") until Lazy gives up on build after too many attempts. I can't be sure what was going on there exactly, but it must be something to do with the version of luarocks that is shipped with lua-for-windows being too old because this problem just went away when I tried using the scoop packages instead of lua-for-windows.

    The next problem is at least the most descriptive as it actually gives you some logs of the build process in the Lazy installer. The lines I thought are the most relevant - No such file or directory "x86_64-w64-mingw32-gcc" and x86_64-w64-mingw32-gcc -O2 -c -o src/parser.o src/parser.c -Isrc -Isrc -shared. I don't have some x86_6ahdfuiehaoufeh-gcc on my path so I was puzzled by where it got that from, but I eventually found that the treesitter build backend of luarocks just couldn't find my C/C++ compiler (I just installed the gcc scoop package if that matters, but that has been good enough for everything else so I don't know why this is different) and this was possibly it's fallback command. I found that at least one way you can solve this is to set up CC and CXX environment variables. In a powershell running, the quick and dirty solution was to run $env:CC = "path_to_gcc" and $env:CXX = "path_to_g++" before nvim, and after that the treesitter things finally got properly built! I'll need to find a more permanent and solid solution to make luarocks find the compilers than that, but I'll do that later and at least you can finally build this way

    The last, kind of cosmetic problem, is the warning you get at launch that says "norg_treesitter parser was not found! many plugin features will not work", it's kind of just wrong because everything still works, but the solution here #1808 (comment) works to shut it up

  4. linguini1 commented on Jun 15, 2026

    @linguini1
    ContributorAuthor

    @Ciliane thanks for your help! This has gotten me farther.

    However, I am now getting a new error when building:

    C:\Users\matte\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
    

    This appears to also happen if I run luarocks config --lua-version=5.1.

    Did you encounter this issue, or any ideas?

  5. Ciliane commented on Jun 15, 2026

    @Ciliane

    yeah, I also had that error line at the top of the error log at the step where it was attempting to compile the parser, where the issue was that the C++ luarocks for some reason couldn't locate compilers by itself. Can you look at more of that log to see if it has something similar to C:\Users\User\scoop\apps\lua\current\lua5.1.exe: cannot open e -e io.write(_VERSION:sub(5)) : No such file or directory "x86_64-w64-mingw32-gcc"? If you do you probably have the same problem I had at this stage, and you should be able to solve it by setting CC and CXX environment variables to point to your C and C++ compilers. If it's not actually that then I'm not sure what it could be, would have to see the entire build log to make a guess

    Also I have that error appear when running luarocks config with --lua-version too, I think you can ignore it because I got neorg working despite it so it wasn't critical. So I think that error appearing in the Lazy build log is basically irrelevant and the real error that ruins the build is something else, likely luarocks not knowing where the compiler is

  6. linguini1 commented on Jun 15, 2026

    @linguini1
    ContributorAuthor

    Here's the full build log from Lazy:

            C:\Users\matte\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
            C:\Users\matte\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
            src/scanner.cc:812:81: warning: 'nodiscard' attribute directive ignored [-Wattributes]
                 bool check_detached(const vector<TokenType>& results, const int32_t expected)
                                                                                             ^
            C:\Users\matte\scoop\apps\lua51\current\lua5.1.dll: file not recognized: File format not recognized
            collect2.exe: error: ld returned 1 exit status
            Installing https://luarocks.org/tree-sitter-norg-0.2.6-1.src.rock
            Missing dependencies for tree-sitter-norg 0.2.6-1:
               luarocks-build-treesitter-parser-cpp ~> 2 (not installed)
    
            tree-sitter-norg 0.2.6-1 depends on luarocks-build-treesitter-parser-cpp ~> 2 (not installed)
            Installing https://luarocks.org/luarocks-build-treesitter-parser-cpp-2.0.6-1.src.rock
    
            Missing dependencies for luarocks-build-treesitter-parser-cpp 2.0.6-1:
               luafilesystem ~> 1 (not installed)
    
            luarocks-build-treesitter-parser-cpp 2.0.6-1 depends on lua >= 5.1 (5.4-1 provided by VM: success)
            luarocks-build-treesitter-parser-cpp 2.0.6-1 depends on luafilesystem ~> 1 (not installed)
            Installing https://lumen-oss.github.io/rocks-binaries/luafilesystem-1.9.0-1.win32-x86_64.rock
    
            luafilesystem 1.9.0-1 depends on lua >= 5.1 (5.4-1 provided by VM: success)
            luafilesystem 1.9.0-1 is now installed in C:\Users\matte\AppData\Local\nvim-data\lazy-rocks\tree-sitter-norg (license: MIT/X11)
    
            luarocks-build-treesitter-parser-cpp 2.0.6-1 is now installed in C:\Users\matte\AppData\Local\nvim-data\lazy-rocks\tree-sitter-norg (license: MIT)
    
    
            C:\MinGW\bin\gcc -O2 -c -o src/parser.o src/parser.c -Isrc -Isrc -shared
            C:\MinGW\bin\g++  -c -o src/scanner.o src/scanner.cc -Isrc -Isrc -shared
            C:\MinGW\bin\gcc  -shared -o C:\Users\matte\AppData\Local\Temp\luarocks_build-tree-sitter-norg-0.2.6-1-4603060\parser\norg.dll src/parser.o src/scanner.o C:\Users\matte\scoop\apps\lua51\current\lua5.1.dll -lm -lstdc++ -lm
            No existing manifest. Attempting to rebuild...
            Warning: The function rockspec.type() is no longer necessary and is now deprecated. Please update your plugin to remove calls to this function.
    
            Error: Build error: Failed compiling module parser\norg.dll
    

    I have set my CC and CXX env variables to point at my mingw installation of gcc and g++.

    From reading this, it appeared the system is missing luafilesystem (even though it says it installed it afterward in the lazy-rocks). I tried installing it myself:

    Installing https://luarocks.org/luafilesystem-1.9.0-1.src.rock
    
    luafilesystem 1.9.0-1 depends on lua >= 5.1 (5.1-1 provided by VM: success)
    C:\MinGW\bin\gcc -O2 -c -o src/lfs.o -IC:/Users/matte/scoop/apps/lua51/current/include src/lfs.c
    C:\MinGW\bin\gcc  -shared -o C:\Users\matte\AppData\Local\Temp\luarocks_build-luafilesystem-1.9.0-1-9171443\lfs.dll src/lfs.o C:\Users\matte\scoop\apps\lua51\current\lua5.1.dll -lm
    C:\Users\matte\scoop\apps\lua51\current\lua5.1.dll: file not recognized: File format not recognized
    collect2.exe: error: ld returned 1 exit status
    
    Error: Build error: Failed compiling module lfs.dll
    

    This error, as far as I can tell from my checking online, is because the compiler I'm using is not the same as the one used to make the lua5.1.dll in the first place. Anyways, this does look like a compiler issue, but I'm not quite sure how to resolve it. Maybe another version of gcc? If it makes a difference, I am running on an arm64 Windows machine which is maybe adding some complications here.

  7. zwiebelbox commented on Jun 16, 2026

    @zwiebelbox

    I got the same issue after following the kickstart guide on Windows. Just a reminder to update the recommendation for installing luarocks when you find a better solution. Or put a note with a link to this thread for now.

  8. Ciliane commented on Jun 16, 2026

    @Ciliane

    @linguini1 indeed it looks like a different kind of issue here. for me it was enough just to have luarocks know where my compiler is so that it can compile, but for you it seems like the issues continue a bit further. I don't know what to do at this point, someone actually knowledgeable about this stuff compiling C/C++ programs probably would be able to help here but I can't, sorry. Different architecture potentially being the cause makes sense, but doesn't give me ideas about what to do except see if you can compile that lua dll and everything yourself (lol). Unfortunate, hope there's someone more knowledgeable who can give a hint or you can figure it out somehow
    (edit: I suppose if you want to you can try it with gcc from its scoop pakage or msys2 to make really sure. I'm not sure what that would change, but maybe it'd magically work)

    @zwiebelbox have you managed to fix it?

  9. zwiebelbox commented on Jun 16, 2026

    @zwiebelbox

    To be clear, I got the original error that luarocks is not found even though it's accessible in the terminal and via :! luarocks. I just searched the repo for a solution and found this thread. I haven't reproduced the error that @linguini1 got.
    I'm attempting a local installation without admin rights.
    I referenced the luarocks repo and it might be possible via the single binary package if you already have lua but then the recommendation for new users would be "install lua for windows and then go to this repo, download a binary and put it into your lua directory" - a bit messy.
    The main issue seems to be that lua for windows doesn't update their luarocks version, so I wondered if there's an issue open for that. I couldn't find one, but they have an open issue about updating the lua version where the solution seems to be to just use scoop package manager instead of their own repo as you mentioned as well. I will check it out later.

  10. zwiebelbox commented on Jun 17, 2026

    @zwiebelbox

    What I did:

    > scoop bucket add versions
    > scoop install lua lua51 luarocks
    > scoop shim add lua5.1 lua51
    

    But I seem to get the same error as @linguini1
    lazy displays the following:

      Failed (2)
        ● tree-sitter-norg 0.19ms  start
            Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird.
            Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird.
            C:\Users\zwiebelbox\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
    
            Error: Lua 5.1 interpreter not found at C:/Users/zwiebelbox/scoop/apps/lua/current
    
            Please set your Lua interpreter with:
    
               luarocks --lua-version=5.1 --local config variables.LUA <d:\path\lua.exe>
            Failed installing tree-sitter-norg with `luarocks`.
    
            --------------------------------------------------------------------------------
    
            Trying to build from source.
            C:\Users\zwiebelbox\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
            C:\Users\zwiebelbox\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
            C:\Users\zwiebelbox\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
    
            Error: Lua 5.1 interpreter not found at C:/Users/zwiebelbox/scoop/apps/lua/current
    
            Please set your Lua interpreter with:
    
               luarocks --lua-version=5.1 --local config variables.LUA <d:\path\lua.exe>
        ● tree-sitter-norg-meta 0.17ms  start
            C:\Users\zwiebelbox\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
            C:\Users\zwiebelbox\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
            Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird.
    
            Error: Lua 5.1 interpreter not found at C:/Users/zwiebelbox/scoop/apps/lua/current
    
            Please set your Lua interpreter with:
    
               luarocks --lua-version=5.1 --local config variables.LUA <d:\path\lua.exe>
            Failed installing tree-sitter-norg-meta with `luarocks`.
    
            --------------------------------------------------------------------------------
    
            Trying to build from source.
            C:\Users\zwiebelbox\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
            C:\Users\zwiebelbox\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
            C:\Users\zwiebelbox\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
    
            Error: Lua 5.1 interpreter not found at C:/Users/zwiebelbox/scoop/apps/lua/current
    
            Please set your Lua interpreter with:
    
               luarocks --lua-version=5.1 --local config variables.LUA <d:\path\lua.exe>
    

    I tried setting my lua interpreter:

    PS C:\Users\zwiebelbox> which lua5.1.exe
    C:/Users/zwiebelbox/scoop/shims/lua5.1.exe
    PS C:\Users\zwiebelbox> luarocks --lua-version=5.1 --local config variables.LUA C:/Users/zwiebelbox/scoop/shims/lua5.1.exe
    C:\Users\zwiebelbox\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
    C:\Users\zwiebelbox\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
    C:\Users\zwiebelbox\scoop\apps\lua\current\lua55.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
    

    And an error window pops up as well:

    [string "src/luarocks/cmd.lua"]:209:bad error, expected string,
    got: nil
    stack traceback:
    	[C]: in function 'assert'
    	[string "src/luarocks/cmd.lua"]:209: in upvalue 'die'
    	[string "src/luarocks/cmd.lua"]:724: in function
    'luarocks.cmd.run_command'
    	[string "luarocks"]:34: in main chunk
    	[C]: in ?
    

    But as you can see, scoop configures lua correctly:

    PS C:\Users\zwiebelbox> lua -e "io.write(_VERSION:sub(5))"
    5.5
    PS C:\Users\zwiebelbox> lua51 -e "io.write(_VERSION:sub(5))"
    5.1
    PS C:\Users\zwiebelbox> lua5.1 -e "io.write(_VERSION:sub(5))"
    5.1
    PS C:\Users\zwiebelbox> lua5.1 e -e "io.write(_VERSION:sub(5))"
    C:\Users\zwiebelbox\scoop\apps\lua51\current\lua5.1.exe: cannot open e: No such file or directory
    

    The issue is caused by the parsed extra e and seems to be a known issue of luarocks on Windows. The attempted fix was reverted because it caused problems in testing. So I don't really understand how you got it to work on your own Windows machine without a local fix or something.

    nvim also displays these errors on startup but following the kickstart guide, I just ignored them for now:

    src/tree_sitter/parser.h:8:21: fatal error: stdbool.h: No such file or directory^M
     #include <stdbool.h>^M
                         ^^M
    compilation terminated.^M
    src/scanner.c:1:19: fatal error: stdio.h: No such file or directory^M
     #include <stdio.h>^M
                       ^^M
    compilation terminated.^M
    
    
    nvim-treesitter[c]: Error during compilation
    In file included from src/parser.c:1:0:^M
    src/tree_sitter/parser.h:8:21: fatal error: stdbool.h: No such file or directory^M
     #include <stdbool.h>^M
                         ^^M
    compilation terminated.^M
    
    
    nvim-treesitter[vim]: Error during compilation
    In file included from src/parser.c:1:0:^M
    src/tree_sitter/parser.h:8:21: fatal error: stdbool.h: No such file or directory^M
     #include <stdbool.h>^M
                         ^^M
    compilation terminated.^M
    src/scanner.c:1:19: fatal error: stdio.h: No such file or directory^M
     #include "stdio.h"^M
                       ^^M
    compilation terminated.^M
    
    Press ENTER or type command to continue
    
  11. zwiebelbox commented on Jun 17, 2026

    @zwiebelbox

    yeah, I also had that error line at the top of the error log at the step where it was attempting to compile the parser, where the issue was that the C++ luarocks for some reason couldn't locate compilers by itself. Can you look at more of that log to see if it has something similar to C:\Users\User\scoop\apps\lua\current\lua5.1.exe: cannot open e -e io.write(_VERSION:sub(5)) : No such file or directory "x86_64-w64-mingw32-gcc"? If you do you probably have the same problem I had at this stage, and you should be able to solve it by setting CC and CXX environment variables to point to your C and C++ compilers. If it's not actually that then I'm not sure what it could be, would have to see the entire build log to make a guess

    Also I have that error appear when running luarocks config with --lua-version too, I think you can ignore it because I got neorg working despite it so it wasn't critical. So I think that error appearing in the Lazy build log is basically irrelevant and the real error that ruins the build is something else, likely luarocks not knowing where the compiler is

    Reading this again, I should focus more on the errors I ignored. Not finding .h files should indeed be an issue with C/C++ paths.

    EDIT: yeah, just installing gcc via scoop (as a quick and dirty fix - I should already have it somewhere else) got rid of most of the errors popping up. I think it said nvim-treesitter installed correctly.

    But on startup it still says:

    norg treesitter parser was not found! Many plugin features will not work.
    norg_meta treesitter parser was not found! Many plugin features will not work.
    

    And tree-sitter-norg (and -meta) are still failing their builds

  12. zwiebelbox commented on Jun 17, 2026

    @zwiebelbox

    After :TSInstall norg, only the error with norg_meta treesitter parser was not found! Many plugin features will not work. shows up un startup. The lazyvim errors are still there. I can't find the norg meta parser this way though. Tried a couple of variants.

    Btw, the kickstart guide assumes that the user doesn't have a prior neovim configuration, but it doesn't mention anything about its installation. On Windows you can scoop install neovim as well. That's what I'm using now.
    Also, I wonder why the splash screen disappeared. You can see what I'm referencing by executing nvim --clean.

  13. linguini1 commented on Jun 17, 2026

    @linguini1
    ContributorAuthor

    So your solution was installing gcc from scoop? Does that conflict with your regular MinGW gcc?

  14. zwiebelbox commented on Jun 17, 2026

    @zwiebelbox

    Actually it does.. It worked right after installing gcc with scoop but in a new terminal, the old MinGW gcc is found before the scoop installation. I guess I have to set the path properly.

    Not sure if I continue though - might revisit neorg after lux is ready to replace luarocks.

  15. Ciliane commented on Jun 17, 2026

    @Ciliane

    I tried setting my lua interpreter:

    PS C:\Users\zwiebelbox> which lua5.1.exe
    C:/Users/zwiebelbox/scoop/shims/lua5.1.exe
    PS C:\Users\zwiebelbox> luarocks --lua-version=5.1 --local config variables.LUA C:/Users/zwiebelbox/scoop/shims/lua5.1.exe
    C:\Users\zwiebelbox\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
    C:\Users\zwiebelbox\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
    C:\Users\zwiebelbox\scoop\apps\lua\current\lua55.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
    

    And an error window pops up as well:

    [string "src/luarocks/cmd.lua"]:209:bad error, expected string,
    got: nil
    stack traceback:
    	[C]: in function 'assert'
    	[string "src/luarocks/cmd.lua"]:209: in upvalue 'die'
    	[string "src/luarocks/cmd.lua"]:724: in function
    'luarocks.cmd.run_command'
    	[string "luarocks"]:34: in main chunk
    	[C]: in ?
    

    But as you can see, scoop configures lua correctly:

    PS C:\Users\zwiebelbox> lua -e "io.write(_VERSION:sub(5))"
    5.5
    PS C:\Users\zwiebelbox> lua51 -e "io.write(_VERSION:sub(5))"
    5.1
    PS C:\Users\zwiebelbox> lua5.1 -e "io.write(_VERSION:sub(5))"
    5.1
    PS C:\Users\zwiebelbox> lua5.1 e -e "io.write(_VERSION:sub(5))"
    C:\Users\zwiebelbox\scoop\apps\lua51\current\lua5.1.exe: cannot open e: No such file or directory
    

    The issue is caused by the parsed extra e and seems to be a known issue of luarocks on Windows. The attempted fix was reverted because it caused problems in testing. So I don't really understand how you got it to work on your own Windows machine without a local fix or something.

    I may have been wrong about having a shim named lua5.1 being enough because at some point I also manually edited luarocks's config file (scoop\apps\luarocks\current\config.lua) to set lua_version to 5.1, and variables.LUA_DIR and variables.LUA_BINDIR to point to the lua51 installation, because setting those things through luarocks config didn't seem to work becauese of those errors. I believed that thing I did would've been reverted because I uninstalled all the lua things at some point and later tried again more "clean", so I thought this wasn't a part of the progress I made. It possibly was, so it'd be good to mention...

    But on startup it still says:

    norg treesitter parser was not found! Many plugin features will not work.
    norg_meta treesitter parser was not found! Many plugin features will not work.
    

    And tree-sitter-norg (and -meta) are still failing their builds

    if you have the parsers install correctly but then sometimes see these messages in startup, that's a different issue reported here with some solutions #1808 . For me the one that worked was to add tree-sitter-norg and tree-sitter-norg-meta as dependencies of norg, after that those warnings don't appear anymore. So did they really build for you properly now? Lazy managed to finish the build and isn't attempting to do it on each startup anymore? Does that mean installing a different gcc actually turned out to be the magic solution in your case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues related to bugs. Please attach a severity, a priority and category with this label.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions