oxocarbon.nvim icon indicating copy to clipboard operation
oxocarbon.nvim copied to clipboard

module 'oxocarbon' not found

Open Integralist opened this issue 3 years ago • 7 comments

This is my config:

use { "shaunsingh/oxocarbon.nvim", run = "./install.sh" }

I install successfully using :PackerSync but enabling the colourscheme displays the following error:

Error detected while processing /Users/integralist/.local/share/nvim/site/pack/packer/start/oxocarbon.nvim/colors/oxocarbon.lua:
E5113: Error while calling lua chunk: ...te/pack/packer/start/oxocarbon.nvim/colors/oxocarbon.lua:1: module 'oxocarbon' not found:
        no field package.preload['oxocarbon']
        no file './oxocarbon.lua'
        no file '/opt/homebrew/share/luajit-2.1.0-beta3/oxocarbon.lua'
        no file '/usr/local/share/lua/5.1/oxocarbon.lua'
        no file '/usr/local/share/lua/5.1/oxocarbon/init.lua'
        no file '/opt/homebrew/share/lua/5.1/oxocarbon.lua'
        no file '/opt/homebrew/share/lua/5.1/oxocarbon/init.lua'
        no file '/Users/integralist/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/oxocarbon.lua'
        no file '/Users/integralist/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/oxocarbon/init.lua'
        no file '/Users/integralist/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/oxocarbon.lua'
        no file '/Users/integralist/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/oxocarbon/init.lua'
        no file './oxocarbon.so'
        no file '/usr/local/lib/lua/5.1/oxocarbon.so'
        no file '/opt/homebrew/lib/lua/5.1/oxocarbon.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file '/Users/integralist/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/oxocarbon.so'
stack traceback:
        [C]: in function 'require'
        ...te/pack/packer/start/oxocarbon.nvim/colors/oxocarbon.lua:1: in main chunk

Integralist avatar Aug 01 '22 12:08 Integralist

A lot of folks seem to be experiencing this; on my own configuration, starting anew on the oxocarbon.nvim install and, like, triple checking that it compiled eventually fixed it in my case (that is, I tried install, compiler hung, deleted, install again, failed, deleted, install again, worked). I'm on macOS as well.

Of course, Rust needs to be compiled to be usable: if your system can't find .so files, then it's almost certainly something with the compiling. If it takes any shorter than 30-45 seconds, something went wrong and wasn't checked/ reported for whatever reason. It took a while for me, at least.

mdmeeker avatar Aug 01 '22 15:08 mdmeeker

@Integralist can you try commit https://github.com/shaunsingh/oxocarbon.nvim/commit/23b7b321d1b73f5f21e654ac6d377434a97a6616 ?

shaunsingh avatar Aug 01 '22 19:08 shaunsingh

@shaunsingh is there an easy way for you to propagate the rustc et. al. error messages? Was trying to install this on another machine and could not... cd down to ~/.local/share/....../start/oxocarbon.nvim and try to run the install script; very quickly met with a message that my rustc is out of date, but couldn't get anything out of Packer. Could probably save a lot of time with issues of the same breed as this, whatever ends up having been the cause.

I can probably look this weekend, but I imagine my efforts would be fruitless seeing as I know very little Rust and basically nothing about building plugins, etc, for neovim.

mdmeeker avatar Aug 01 '22 23:08 mdmeeker

@mjachi All of the cargo build output gets sent for Packer.nvim to display, though the second the script fails/ends it just ends with failed to install oxocarbon.nvim. technically if cargo build fails I could just tell the script to hang forever with a print message telling the user the last output of cargo, though I think thats a bit extreme.

For now I'll add "minimum rustc version" and rustup/rustc/cargo upgrade instructions in the readme

shaunsingh avatar Aug 01 '22 23:08 shaunsingh

Got it. I did see the various messages, but, yeah, the error is certainly the most important one... agreed on the infinite hang.

In particular, I would suggest indicating trying to build directly in the Packer install location, since the error message doesn't disappear in the same instant.

mdmeeker avatar Aug 01 '22 23:08 mdmeeker

@shaunsingh that commit worked!

Integralist avatar Aug 02 '22 11:08 Integralist

Nice to hear, nvim-oxi has a feature for nightly users and it seems to have broken the colorscheme for stable users. I'll likely make two branches of the colorsche (one for nightly one for stable) and that should resolve it 👍

shaunsingh avatar Aug 03 '22 04:08 shaunsingh