denops-gh.vim icon indicating copy to clipboard operation
denops-gh.vim copied to clipboard

Error importing http modules

Open joshmedeski opened this issue 1 year ago • 4 comments

🐛 Summary

I got the following error when opening neovim

[denops] gh: TypeError: Modules imported via https are not allowed to import http modules.
[denops]   Importing: http://cdn.esm.sh/v91/[email protected]/deno/isExtractableFile.mjs.js
[denops]     at https://cdn.esm.sh/[email protected]/isExtractableFile.mjs:3:25

💔 Enviroment

  • Vim/Neovim Version: NVIM v0.7.2
  • OS: macOS 12.5 (21G72)

👀 Steps

  1. Install vim-denops/denops.vim and skanehira/denops-gh.vim with vim plug on neovim
  2. Open neovim3.
  3. Run :messages to see the error.

🆗 Expected

The denops-gh plugin loads successfully.

🚑 Actual

The denops-gh plugin does not work.

joshmedeski avatar Aug 15 '22 17:08 joshmedeski

@joshmedeski I've never seen this message 🤔 Please run this command, I want to check your deno's version.

:echo system("deno --version")

skanehira avatar Aug 16 '22 11:08 skanehira

deno 1.24.3 (release, aarch64-apple-darwin)
v8 10.4.132.20
typescript 4.7.4

joshmedeski avatar Aug 16 '22 14:08 joshmedeski

Same as me. I don't know what's causing this right now, but I'll look into it. Give me a minute.

skanehira avatar Aug 16 '22 14:08 skanehira

Maybe fix by this commit. https://github.com/ArtCodeStudio/graphql-request/commit/e23214dd033e024d580c5674cfad5b0bd057978d

skanehira avatar Sep 04 '22 22:09 skanehira

I have same issue.

Follow steps produce the problem in my environment.

  1. Put follow init.vim to any directory
  2. Start Neovim by nvim -Nu init.vim

init.vim:

const s:packpath = expand('<sfile>:h') .. '/plugins/'
const s:optpackpath = s:packpath .. 'pack/foo/opt/'
if !isdirectory(s:optpackpath)
  call system(printf('mkdir -p %s', s:optpackpath))
endif
exec printf('set packpath=%s', s:packpath)

function s:packadd(ghrepo)
  const l:installdir = s:optpackpath .. a:ghrepo
  if !isdirectory(l:installdir)
    call system(printf('git clone https://github.com/%s.git %s', a:ghrepo, l:installdir))
  endif
  exec printf('packadd %s', a:ghrepo)
endfunction

call s:packadd('vim-denops/denops.vim')
call s:packadd('skanehira/denops-gh.vim')

"command OpenIssues new gh://skanehira/denops-gh.vim/issues

image

  • gh --version -> 2.18.1 (2022-10-20)
  • OS -> Arch Linux (on the Windows Subsystem for Linux)
  • nvim --version -> NVIM v0.9.0-dev-143+ga288b4f21 Build type: RelWithDebInfo
  • deno --version -> deno 1.26.2 (release, x86_64-unknown-linux-gnu)

ogaken-1 avatar Oct 24 '22 03:10 ogaken-1

Sorry for the delay. I fixed it and I think it works with the latest version.

skanehira avatar Oct 29 '22 11:10 skanehira

It looks the issue was solved in my environment.

ogaken-1 avatar Oct 29 '22 12:10 ogaken-1