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

bug: Lazy is unable to perform post install run task that uses deno

Open zootedb0t opened this issue 2 years ago • 4 comments

Did you check docs and existing issues?

  • [X] I have read all the lazy docs
  • [X] I have searched the existing issues of lazy
  • [X] I have searched the exsiting issues of the plugin I have a problem with

Neovim version (nvim -v)

NVIM v0.9.0-dev-604+g5b22b32e5

Operating system/version

EndeavourOS

Describe the bug

I tried installing peek.nvim plugin. This plugin requires a post install task { 'toppair/peek.nvim', run = 'deno task --quiet build:fast' } after installing lazy was unable to perform this task. To fix this i went to this directory /home/stoney/.local/share/nvim/lazy/peek.nvim and run the above command manually and plugin begin to work.

Steps To Reproduce

Install peek.nvim plugin. And try to preview markdown files. It will throw errors.

Expected Behavior

Lazy should automatically perform the post install deno task.

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "--single-branch",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  -- add any other plugins here
  {
    "toppair/peek.nvim",
    run = "deno task --quiet build:fast",
    ft = "markdown",
  },
},
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

zootedb0t avatar Jan 04 '23 17:01 zootedb0t

What was the error you got?

I use peek myself without any issues. Is deno on your path inside neovim?

folke avatar Jan 04 '23 17:01 folke

Peek error: error: Module not found "file:///home/stoney/.local/share/nvim/lazy/peek.nvim/public/main.bundle.js".

zootedb0t avatar Jan 04 '23 17:01 zootedb0t

I'm sure deno is in my system path. How can i check if it is in my neovim path.

zootedb0t avatar Jan 04 '23 17:01 zootedb0t

I meant what is the error you get in lazy when it was building peek? Inside lazy, you can press <b> to build a plugin. Report back with the error you see there

folke avatar Jan 04 '23 17:01 folke

Screenshot_2023-01-04-11-28-28_1920x1080 Lazy throws no error while building peek. But on running command PeekOpen. I get the same error message.

zootedb0t avatar Jan 04 '23 18:01 zootedb0t

If it doesn't report an error, then build was succesful, so not a lazy issue. You'll need to debug this yourself....

folke avatar Jan 04 '23 18:01 folke