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

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

Open thiago-figueredo opened this issue 1 year ago • 7 comments

When i run :PeekOpen i have this error:

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

thiago-figueredo avatar Jun 15 '24 15:06 thiago-figueredo

This error can happen when you install peek.nvim without deno already installed. If you have deno installed, try reinstalling peek.nvim.

pistolpeter avatar Jun 25 '24 20:06 pistolpeter

After installing deno, go to nvim-data/lazy/peek.nvim and run the command "deno task --quiet build:fast", then try to use PeekOpen in nvim again, it should work.

AbdullahASCS avatar Jul 03 '24 08:07 AbdullahASCS

I got the same error. deno is installed but the build fails:

~/.local/share/nvim/site/pack/packer/start/peek.nvim master
λ deno task build:fast
Task build:fast FAST=true deno task --quiet build
error: Import 'https://deno.land/x/[email protected]/mod.ts' failed: error sending request for url (https://deno.land/x/[email protected]/mod.ts): error trying to connect: invalid peer certificate: UnknownIssuer
    at file:///Users/dennis.schoen/.local/share/nvim/site/pack/packer/start/peek.nvim/scripts/build.js:1:24

roccoblues avatar Jul 08 '24 08:07 roccoblues

Getting exactly the same error even after trying to run as suggested

sollymay avatar Jul 26 '24 19:07 sollymay

Issue is as it user pointed out, the main.bundle.js does not get created. Will have to investigate the build file. Will investigate and update

EDIT - The issue is a weird one. It does not occur on deno -

[bob@bob-systemproductname resume]$ deno --version
deno 1.45.4 (release, x86_64-unknown-linux-gnu)
v8 12.7.224.13
typescript 5.5.2
[bob@bob-systemproductname resume]$ 

The root cause -

deno does not load std lib properly. This occurs if you are using your package managers' deno version or you haven't updated it in a while, you can use -

The deno command

curl -fsSL https://deno.land/install.sh | sh

That should fix the issue. I was able to get it working. After you update deno, just go to the lazy package manger

Press I

Search for peek, press x to delete.

then scroll to the not installed tab where you'll find peek. Press I again. You needn't build it manually.

sanchayanghosh avatar Jul 28 '24 17:07 sanchayanghosh

install the deno runtime prior to using this plugin with:

curl -fsSL https://deno.land/install.sh | sh (osx)

or,

irm https://deno.land/install.ps1 | iex (windows)

that's why it's listed as a prereq for the plugin. if you already have it installed, navigate to your .local/share/nvim/lazy/peek.nvim and delete it before re-entering neovim and using the command :Lazy. everything should be fixed after this. root cause of issue is not having the deno to build the plugin after installation.

enkyuan avatar Oct 02 '24 20:10 enkyuan

Got the same error. I installed deno after peek. Following @pistolpeter, I reinstalled peek and it worked.

JanPanjan avatar Dec 05 '24 20:12 JanPanjan