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

Error executing lua [string ":lua"]:200: module 'silicon' not found: #44

Open
atlas-comstock opened this issue Mar 5, 2024 · 4 comments

Comments

@atlas-comstock
Copy link

atlas-comstock commented Mar 5, 2024

Updated:
Running ./install.sh build during the installation process can help resolve the issue.


After installation, can not find the module of silicon
I use the example config

require('silicon').setup {
  font = 'FantasqueSansMono Nerd Font=26',
  background = '#87f',
  theme = 'Monokai Extended',
  line_number = true,
  pad_vert = 80,
  pad_horiz = 50,
  output = {
    path = "/home/krivah/Pictures/Screenshots"
  },
  watermark = {
    text = ' @krivahtoo',
  },
  window_title = function()
    return vim.fn.fnamemodify(vim.fn.bufname(vim.fn.bufnr()), ':~:.')
  end,
}

here is the error message

Error detected while processing rawconfig/nvim/init.vim:

line  224:
E5108: Error executing lua [string ":lua"]:200: module 'silicon' not found:
        no field package.preload['silicon']
        no file './silicon.lua'
        no file '/opt/homebrew/share/luajit-2.1/silicon.lua'
        no file '/usr/local/share/lua/5.1/silicon.lua'
        no file '/usr/local/share/lua/5.1/silicon/init.lua'
        no file '/opt/homebrew/share/lua/5.1/silicon.lua'
        no file '/opt/homebrew/share/lua/5.1/silicon/init.lua'
        no file './silicon.so'
        no file '/usr/local/lib/lua/5.1/silicon.so'
        no file '/opt/homebrew/lib/lua/5.1/silicon.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        [string ":lua"]:200: in main chunk

Thanks.

 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000 arm64

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1703358377

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.9.5/share/nvim"

Run :checkhealth for more info
@alwaysamer
Copy link

alwaysamer commented Mar 5, 2024

I am having the exact same Issue with my lua config :

E5113: Error while calling lua chunk: /Users/alwaysamer/source/dot/nvim/after/plugin/screenshot.lua:13: module 'silicon' not found:                             
        no field package.preload['silicon']                                                                                                                   
        no file './silicon.lua'                                                                                                                               
        no file '/opt/homebrew/share/luajit-2.1/silicon.lua'                                                                                                  
        no file '/usr/local/share/lua/5.1/silicon.lua'                                                                                                        
        no file '/usr/local/share/lua/5.1/silicon/init.lua'                                                                                                   
        no file '/opt/homebrew/share/lua/5.1/silicon.lua'                                                                                                     
        no file '/opt/homebrew/share/lua/5.1/silicon/init.lua'                                                                                                
        no file '/Users/alwaysamer/.cache/nvim/packer_hererocks/2.1.1703358377/share/lua/5.1/silicon.lua'                                                       
        no file '/Users/alwaysamer/.cache/nvim/packer_hererocks/2.1.1703358377/share/lua/5.1/silicon/init.lua'                                                  
        no file '/Users/alwaysamer/.cache/nvim/packer_hererocks/2.1.1703358377/lib/luarocks/rocks-5.1/silicon.lua'                                              
        no file '/Users/alwaysamer/.cache/nvim/packer_hererocks/2.1.1703358377/lib/luarocks/rocks-5.1/silicon/init.lua'                                         
        no file './silicon.so'                                                                                                                                
        no file '/usr/local/lib/lua/5.1/silicon.so'                                                                                                           
        no file '/opt/homebrew/lib/lua/5.1/silicon.so'                                                                                                        
        no file '/usr/local/lib/lua/5.1/loadall.so'                                                                                                           
        no file '/Users/alwaysamer/.cache/nvim/packer_hererocks/2.1.1703358377/lib/lua/5.1/silicon.so'                                                          
stack traceback:                                                                                                                                              
        [C]: in function 'require'                                                                                                                            
        /Users/alwaysamer/source/dot/nvim/after/plugin/screenshot.lua:13: in main chunk 

@kstiehl
Copy link

kstiehl commented Mar 8, 2024

If you are using an ARM macbook you have to use the ./install.sh build command after installing silicion. Silicon is written in rust and currently no ARM build is provided.

So if you are using Plug you have to use

Plug 'krivahtoo/silicon.nvim', { 'do': './install.sh build' }

In order for that to work you need cargo on your system

@xiaoqixian
Copy link

If you are using an ARM macbook you have to use the ./install.sh build command after installing silicion. Silicon is written in rust and currently no ARM build is provided.

So if you are using Plug you have to use

Plug 'krivahtoo/silicon.nvim', { 'do': './install.sh build' }

In order for that to work you need cargo on your system

Still not working, there's nothing like "silicon.lua" or a directory named after "silicon" in the "lua" directory, neovim cannot find the silicon module.

@krivahtoo
Copy link
Owner

Try running ./install.sh build in the install location of silicon.nvim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants