Skip to content
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

module 'lua-utils' not found #1563

Open
2 tasks done
mairs8 opened this issue Aug 24, 2024 · 6 comments
Open
2 tasks done

module 'lua-utils' not found #1563

mairs8 opened this issue Aug 24, 2024 · 6 comments
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.

Comments

@mairs8
Copy link

mairs8 commented Aug 24, 2024

Prerequisites

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

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

@mairs8 mairs8 added the bug Issues related to bugs. Please attach a severity, a priority and category with this label. label Aug 24, 2024
@github-project-automation github-project-automation bot moved this to added-updated-reopened in sorting neorg issue tracker Aug 24, 2024
@VanshajSaxena
Copy link

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
Copy link

livexia commented Aug 26, 2024

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
Copy link
Contributor

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

@livexia
Copy link

livexia commented Aug 26, 2024

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
Copy link
Contributor

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

@ubuntupunk
Copy link

ubuntupunk commented Nov 15, 2024

apt install luarocks
luarocks install lua-utils.nvim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.
Projects
None yet
Development

No branches or pull requests

5 participants