nvim-neorg / neorg

Modernity meets insane extensibility. The future of organizing your life in Neovim.
GNU General Public License v3.0
6.31k stars 209 forks source link

module 'lua-utils' not found #1563

Open mairs8 opened 3 weeks ago

mairs8 commented 3 weeks ago

Prerequisites

Neovim Version

NVIM v0.10.1 Build type: Release LuaJIT 2.1.1713773202

Neorg setup

require("neorg").setup()

Actual behavior

When i launch neovim on my nixos machine i get the following error. The :neorg command is not available.

Error detected while processing /home/billy/.config/nvim/init.lua:
E5113: Error while calling lua chunk: vim/_editor.lua:0: /home/billy/.config/nvim/init.lua..nvim_exec2() called at /home/billy/.config/nvim/init.lua:0../nix/store/pa70ya9ra4bl00qzyxpynp2arc3jy9zn-nvim-init-home-manager.vim, line 808: Vim(lua):E5108: Error executing lua ...ack/myNeovimPackages/start/neorg/lua/neorg/core/init.lua:7: module 'lua-utils' not found:
    no field package.preload['lua-utils']
        ....
    no file '/nix/store/xq88fv22ld2dnwzrfd79ji800vp2z065-luajit-2.1.1713773202-env/lib/lua/5.1/lua-utils.so'
stack traceback:
    [C]: in function 'require'
    ...ack/myNeovimPackages/start/neorg/lua/neorg/core/init.lua:7: in main chunk
    [C]: in function 'require'
    ...dir/pack/myNeovimPackages/start/neorg/lua/neorg/init.lua:5: in main chunk
    [C]: in function 'require'
    [string ":lua"]:2: in main chunk
    [C]: in function 'nvim_exec2'
    vim/_editor.lua: in function 'cmd'
    /home/billy/.config/nvim/init.lua:1: in main chunk
stack traceback:
    [C]: in function 'nvim_exec2'

Expected behavior

i should be able to launch neovim without error and run neorg.

Steps to reproduce

On unstable version of nixos, install the latest neovim and neorg packages from the nix store and launch neovim in terminal with nvim.

Potentially conflicting plugins

No response

Other information

No response

Help

None

Implementation help

No response

VanshajSaxena commented 3 weeks ago
2024-08-24T15:51:08 lazy.nvim  ERROR Failed to run `config
` for neorg

...ome/.local/share/nvim/lazy/neorg/lua/neorg/core/init.lua
:7: module 'lua-utils' not found:
        no field package.preload['lua-utils']
cache_loader: module lua-utils not found
cache_loader_lib: module lua-utils not found
        no file './lua-utils.lua'
        no file '/data/data/com.termux/files/usr/share/luaj
it-2.1/lua-utils.lua'
        no file '/usr/local/share/lua/5.1/lua-utils.lua'
        no file '/usr/local/share/lua/5.1/lua-utils/init.lu
a'
        no file '/data/data/com.termux/files/usr/share/lua/
5.1/lua-utils.lua'
        no file '/data/data/com.termux/files/usr/share/lua/
5.1/lua-utils/init.lua'
        no file './lua-utils.so'
        no file '/usr/local/lib/lua/5.1/lua-utils.so'
        no file '/data/data/com.termux/files/usr/lib/lua/5.
1/lua-utils.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'

# stacktrace:
  - /neorg/lua/neorg/core/init.lua:7
  - /neorg/lua/neorg/init.lua:5
  - lua/plugins/neorg.lua:8 _in_ **config**
  - lua/config/lazy.lua:10
  - init.lua:1

Getting a similar error on termux android.

livexia commented 2 weeks ago

I found a method that might works

  1. first install old version of neorg(8.x.x)
  2. after successful install
  3. update the version to "*"
max397574 commented 2 weeks ago

this would just be a workaround around some error with your setup

livexia commented 2 weeks ago

Yeah maybe, I have mutilple machine with same config, this problem occurs when I setup a new machine, old machine with newest neorg no problem, so I figure I can just install the old version and then update it. My probelm related issue is #1530.

max397574 commented 2 weeks ago

I know the issue that happens but this is due to a problem with your setup (one of the causes could be missing luarocks) and this is just a hack that happens to work